Skip to content

Set up pre-commit (w/ Zizmor and misc.), Dependabot and tidy up GH workflows #3

Set up pre-commit (w/ Zizmor and misc.), Dependabot and tidy up GH workflows

Set up pre-commit (w/ Zizmor and misc.), Dependabot and tidy up GH workflows #3

Workflow file for this run

name: Run tests
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
env:
FORCE_COLOR: 1
permissions:
contents: read
jobs:
test:
name: Test on Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3"]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
persist-credentials: false
- name: Set up uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
enable-cache: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --locked --dev --no-editable
- name: Install Playwright browsers
run: uv run playwright install --with-deps chromium
- name: Run tests
run: uv run pytest tests/ -v --tb=short
- name: Upload coverage reports
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: test-results-${{ matrix.python-version }}
path: |
.coverage
htmlcov/
retention-days: 30