Fixed package dependencies for pylint, isort #34
Workflow file for this run
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
| # This GitHub workflow will setup and run various kinds of tests with a variety of Python versions | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| name: test | |
| on: | |
| schedule: | |
| # The schedule event always (and only) runs on the master branch. | |
| - # cron (in UTC): minute hour day_of_month month day_of_week | |
| cron: '00 03 * * SUN' | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| set_matrix: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.select_matrix.outputs.matrix }} | |
| steps: | |
| - name: "Select matrix" | |
| id: select_matrix | |
| # Select full matrix when scheduled or when releasing, and normal matrix | |
| # otherwise. The matrix is defined as a JSON string. | |
| # This technique documented in: | |
| # https://stackoverflow.com/questions/65384420/how-to-make-a-github-action-matrix-element-conditional | |
| # TODO: Find a way to define this with less escapes. | |
| run: | | |
| if [[ "${{ github.event_name }}" == "schedule" || "${{ github.head_ref }}" =~ ^release_ ]]; then \ | |
| echo "matrix={ \ | |
| \"os\": [ \"ubuntu-latest\", \"macos-latest\", \"windows-latest\" ], \ | |
| \"python-version\": [ \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\" ], \ | |
| \"package_level\": [ \"minimum\", \"latest\" ] \ | |
| }" >> $GITHUB_OUTPUT; \ | |
| else \ | |
| echo "matrix={ \ | |
| \"os\": [ \"ubuntu-latest\" ], \ | |
| \"python-version\": [ \"3.9\", \"3.14\" ], \ | |
| \"package_level\": [ \"minimum\", \"latest\" ], \ | |
| \"include\": [ \ | |
| { \ | |
| \"os\": \"macos-latest\", \ | |
| \"python-version\": \"3.9\", \ | |
| \"package_level\": \"latest\" \ | |
| }, \ | |
| { \ | |
| \"os\": \"macos-latest\", \ | |
| \"python-version\": \"3.14\", \ | |
| \"package_level\": \"minimum\" \ | |
| }, \ | |
| { \ | |
| \"os\": \"windows-latest\", \ | |
| \"python-version\": \"3.9\", \ | |
| \"package_level\": \"minimum\" \ | |
| }, \ | |
| { \ | |
| \"os\": \"windows-latest\", \ | |
| \"python-version\": \"3.14\", \ | |
| \"package_level\": \"latest\" \ | |
| } \ | |
| ] \ | |
| }" >> $GITHUB_OUTPUT; \ | |
| fi | |
| - name: Show matrix in JSON | |
| run: echo '${{ steps.select_matrix.outputs.matrix }}' | |
| test: | |
| needs: set_matrix | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 20 | |
| matrix: ${{ fromJson(needs.set_matrix.outputs.matrix) }} | |
| runs-on: ${{ matrix.os }} | |
| container: ${{ matrix.container }} | |
| env: | |
| PIP_DISABLE_PIP_VERSION_CHECK: 1 | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - name: Check commit messages - Signed-off-by | |
| if: github.event_name != 'schedule' | |
| uses: gsactions/commit-message-checker@v2 | |
| with: | |
| pattern: '^Signed-off-by: [^<>]+ <[^<>]+>$' | |
| flags: 'gm' | |
| excludeDescription: true | |
| excludeTitle: true | |
| checkAllCommitMessages: true | |
| accessToken: ${{ secrets.GITHUB_TOKEN }} | |
| error: Commit message has no or incorrectly formatted signed-off-by line | |
| - name: Check commit messages - Line length | |
| if: github.event_name == 'pull_request' | |
| uses: gsactions/commit-message-checker@v2 | |
| with: | |
| pattern: '^.{1,80}\n\n(.{0,80}\n)*.{0,80}$' | |
| flags: '' | |
| excludeDescription: true | |
| excludeTitle: true | |
| checkAllCommitMessages: true | |
| accessToken: ${{ secrets.GITHUB_TOKEN }} | |
| error: Commit message title or body exceeds maximum line length of 80 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Display environment | |
| env: | |
| PACKAGE_LEVEL: ${{ matrix.package_level }} | |
| run: | | |
| make env | |
| - name: Display initial Python packages | |
| env: | |
| PACKAGE_LEVEL: ${{ matrix.package_level }} | |
| run: | | |
| make pip_list | |
| - name: Display platform | |
| env: | |
| PACKAGE_LEVEL: ${{ matrix.package_level }} | |
| run: | | |
| make platform | |
| - name: Development setup | |
| env: | |
| PACKAGE_LEVEL: ${{ matrix.package_level }} | |
| run: | | |
| make develop | |
| - name: Show installed package versions | |
| env: | |
| PACKAGE_LEVEL: ${{ matrix.package_level }} | |
| run: | | |
| make pip_list | |
| - name: Show package dependency tree | |
| run: | | |
| echo "Package dependency tree of installed Python packages:" | |
| python -m pipdeptree --all | |
| - name: Run flake8 | |
| env: | |
| PACKAGE_LEVEL: ${{ matrix.package_level }} | |
| run: | | |
| make flake8 | |
| - name: Run ruff | |
| env: | |
| PACKAGE_LEVEL: ${{ matrix.package_level }} | |
| run: | | |
| make ruff | |
| - name: Run pylint | |
| env: | |
| PACKAGE_LEVEL: ${{ matrix.package_level }} | |
| run: | | |
| make pylint | |
| - name: Run test | |
| env: | |
| PACKAGE_LEVEL: ${{ matrix.package_level }} | |
| # TESTCASES: a value for pytest -k | |
| run: | | |
| make test | |
| - name: Run check_reqs | |
| env: | |
| PACKAGE_LEVEL: ${{ matrix.package_level }} | |
| run: | | |
| make check_reqs | |
| test_finish: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| container: python:3-slim | |
| steps: | |
| - name: Dummy end step | |
| run: | | |
| echo "All tests finished" |