Merge pull request #209 from martius-lab/fkloss/refactor #453
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: "Linters (comprl)" | |
| # Run on pull requests and when merging to main branch | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "comprl/**" | |
| pull_request: | |
| paths: | |
| - "comprl/**" | |
| defaults: | |
| run: | |
| working-directory: "comprl" | |
| jobs: | |
| mypy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Install the project | |
| run: uv sync --all-extras | |
| - name: Add matcher | |
| run: | | |
| echo "::add-matcher::.github/workflows/mypy-problem-matcher.json" | |
| - name: Run mypy | |
| run: | | |
| uv run mypy . | |
| ruff-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Install the project | |
| run: uv sync | |
| # Include `--output-format=github` to enable automatic inline annotations. | |
| - name: Run ruff check | |
| run: uv run ruff check --output-format=github . | |
| ruff-format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Install the project | |
| run: uv sync | |
| - name: Run ruff format | |
| run: uv run ruff format --diff . |