chore: use ruff to lint and format files and apply fixes (#3779) #2
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 | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| defaults: | |
| run: | |
| shell: bash | |
| permissions: | |
| contents: read | |
| jobs: | |
| mypy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout the code | |
| - uses: actions/checkout@v6 | |
| - uses: jpetrucciani/mypy-check@master | |
| with: | |
| path: 'python/runfiles' | |
| - uses: jpetrucciani/mypy-check@master | |
| with: | |
| path: 'tests/runfiles' | |
| ruff: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/ruff-action@v4.0.0 | |
| with: | |
| # Keep in sync with .pre-commit-config.yaml | |
| version: 0.15.14 | |
| args: check --extend-exclude testdata | |
| - uses: astral-sh/ruff-action@v4.0.0 | |
| with: | |
| version: 0.15.14 | |
| args: format --check --exclude testdata |