name: Unit tests on: workflow_dispatch: push: branches: [ main ] pull_request: branches: [ main ] concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: tests: name: Run unit tests runs-on: ubuntu-latest permissions: contents: read steps: - name: Checkout repository uses: actions/checkout@v6 - name: Create venv and install project run: | set -euo pipefail python3 -m venv .venv . .venv/bin/activate python -m pip install --upgrade pip # Install project (editable) and test deps python -m pip install -e .[test] || python -m pip install -e . python -m pip install pytest - name: Run tests env: PYTHONPATH: ${{ github.workspace }} run: | set -euo pipefail . .venv/bin/activate pytest -q