Refactor CI workflow to improve dependency management and add type-ch… #3
This file contains 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: Check and lint | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
push: | |
jobs: | |
dependencies: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
- name: Check lock file consistency | |
run: uv sync --locked | |
type-checking: | |
runs-on: ubuntu-latest | |
needs: dependencies | |
steps: | |
- name: Type-checking (mypy) | |
run: uv run mypy | |
lint: | |
runs-on: ubuntu-latest | |
needs: dependencies | |
steps: | |
- name: Linter (ruff check) | |
run: uv run ruff check --output-format=github | |
- name: Formatter (ruff format) | |
run: uv run ruff format --diff | |
continue-on-error: true |