From 439004174b40485d5fcd3310c9105f28fa80ed16 Mon Sep 17 00:00:00 2001 From: Mick Vleeshouwer Date: Tue, 28 Jul 2026 23:20:12 +0000 Subject: [PATCH 1/3] Run pytest in CI --- .github/workflows/main.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index c1b4763..6d4f9cc 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -54,3 +54,6 @@ jobs: env: SKIP: ${{ github.ref == 'refs/heads/main' && 'no-commit-to-branch' || '' }} run: uv run prek run --show-diff-on-failure --color=always --all-files + + - name: Run pytest + run: uv run pytest -q From 65825672da1d82888966e330b23200fb91d6c8d4 Mon Sep 17 00:00:00 2001 From: Mick Vleeshouwer Date: Tue, 28 Jul 2026 23:22:28 +0000 Subject: [PATCH 2/3] Key venv cache by Python version --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6d4f9cc..677f95d 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -34,7 +34,7 @@ jobs: uses: actions/cache@v6 with: path: .venv - key: venv-${{ hashFiles('**/uv.lock') }} + key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/uv.lock') }} - name: Cache prek uses: actions/cache@v6 From 2d2eae055f59d49ee0ba2e76b73eb79ba7b0ad59 Mon Sep 17 00:00:00 2001 From: Mick Vleeshouwer Date: Sun, 16 Aug 2026 18:32:35 +0000 Subject: [PATCH 3/3] ci: separate pytest workflow --- .github/workflows/main.yaml | 6 ++--- .github/workflows/pytest.yaml | 45 +++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/pytest.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 677f95d..a24afc4 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -21,6 +21,7 @@ jobs: - uses: actions/checkout@v7 - name: Set up Python ${{ matrix.python-version }} + id: setup-python uses: actions/setup-python@v7 with: python-version: "${{ matrix.python-version }}" @@ -34,7 +35,7 @@ jobs: uses: actions/cache@v6 with: path: .venv - key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/uv.lock') }} + key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/uv.lock') }} - name: Cache prek uses: actions/cache@v6 @@ -54,6 +55,3 @@ jobs: env: SKIP: ${{ github.ref == 'refs/heads/main' && 'no-commit-to-branch' || '' }} run: uv run prek run --show-diff-on-failure --color=always --all-files - - - name: Run pytest - run: uv run pytest -q diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml new file mode 100644 index 0000000..9bdac12 --- /dev/null +++ b/.github/workflows/pytest.yaml @@ -0,0 +1,45 @@ +name: Pytest + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test: + name: "Python ${{ matrix.python-version }}" + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + python-version: ["3.11", "3.12", "3.13", "3.14"] + + steps: + - uses: actions/checkout@v7 + + - name: Set up Python ${{ matrix.python-version }} + id: setup-python + uses: actions/setup-python@v7 + with: + python-version: "${{ matrix.python-version }}" + + - name: Install uv + uses: astral-sh/setup-uv@v7 + with: + enable-cache: true + + - name: Cache venv + uses: actions/cache@v6 + with: + path: .venv + key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/uv.lock') }} + + - name: Install dependencies + run: uv sync --all-groups + + - name: Run pytest + run: uv run pytest -q