Skip to content

Include checker name in cache key and tidy up some code. #2475

Include checker name in cache key and tidy up some code.

Include checker name in cache key and tidy up some code. #2475

Workflow file for this run

name: Build and test
on:
push:
branches: [main, sbp]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
env:
UV_VERSION: '0.8.8'
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- '3.13'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}
- uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
with:
version: ${{ env.UV_VERSION }}
# Cache packages per python version, and reuse until lockfile changes
- name: Cache python packages
id: cache
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: .venv
key: venv-${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}
- name: Install dependencies
#if: steps.cache.outputs.cache-hit != 'true'
run: uv sync --no-dev --group test
- name: Run unit tests
run: |
uv run --frozen pytest -rs tests
- name: Run Playwright end-to-end tests
run: |
sh tests/run-playwright.sh