Merge pull request #292 from RONAK-AI647/RONAK-A1647/-Implementation-… #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| pull_request: | |
| paths-ignore: | |
| - '**.md' | |
| jobs: | |
| pylint: | |
| runs-on: ubuntu-22.04 | |
| name: pylint | |
| strategy: | |
| matrix: | |
| python-version: [ "3.7", "3.8", "3.9" ] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install libgl1-mesa-glx -y | |
| python -m pip install pip==24.0 | |
| python -m pip install pylint | |
| python -m pip install ${{github.workspace}}/examples/resources/third_party/* | |
| python -m pip install -r ${{github.workspace}}/requirements.txt | |
| - name: Analysing code of core with pylint | |
| # `--max-positional-arguments=10` is set for Python 3.9 to avoid `R0917: too-many-positional-arguments`. | |
| # See details at https://github.com/kubeedge/ianvs/issues/157 | |
| run: | | |
| if [ "${{ matrix.python-version }}" = "3.9" ]; then | |
| pylint --max-positional-arguments=10 '${{github.workspace}}/core' | |
| else | |
| pylint '${{github.workspace}}/core' | |
| fi |