CI: Matrix on supported Python versions #48
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
| # Basic CI setup: Lint with ruff, run tests with pytest | |
| name: Test | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| lint: | |
| name: Run linting and format | |
| strategy: | |
| matrix: | |
| # Only test a subset of python versions, to limit compute | |
| python: [python3.9, python3.11, python3.13] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v6 | |
| - run: uv python install ${{ matrix.python }} | |
| - run: uv run ruff check src/obelisk/ | |
| - run: uv run ruff format --check src/obelisk/ | |
| - run: uv run mypy src/obelisk/ | |
| test: | |
| name: Run tests | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| # Only test a subset of python versions, to limit compute | |
| python: [python3.9, python3.11, python3.13] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v6 | |
| - run: uv python install ${{ matrix.python }} | |
| - run: uv run pytest |