Python lint #451
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
| name: Python lint | |
| permissions: | |
| contents: read | |
| # Cancel workflow if there is a new change to the branch. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| on: | |
| merge_group: | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - "**/*.py" | |
| - ".github/workflows/python-lint.yml" | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "**/*.py" | |
| - ".github/workflows/python-lint.yml" | |
| jobs: | |
| python-lint: | |
| if: ${{ !startsWith(github.ref, 'refs/heads/gh-readonly-queue/') }} | |
| runs-on: ubuntu-slim | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install black flake8 | |
| - name: Run black | |
| run: black --check scripts/ | |
| - name: Run flake8 | |
| run: flake8 scripts/ |