ci: align ruff tooling and add CI workflow #1
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: CI | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| # Cancel in-flight runs on the same ref when a new push lands. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| # Conformance fixtures live in the openarmature-spec submodule. | |
| submodules: recursive | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| enable-cache: true | |
| - name: Install Python | |
| run: uv python install 3.12 | |
| - name: Sync deps | |
| run: uv sync --frozen | |
| - name: Lint (ruff check) | |
| run: uv run ruff check . | |
| - name: Format check (ruff format --check) | |
| run: uv run ruff format --check . | |
| - name: Type check (pyright) | |
| run: uv run pyright src/ tests/ | |
| - name: Run tests (pytest) | |
| run: uv run pytest -q |