Skip to content

Merge pull request #209 from martius-lab/fkloss/refactor #453

Merge pull request #209 from martius-lab/fkloss/refactor

Merge pull request #209 from martius-lab/fkloss/refactor #453

Workflow file for this run

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 .