Skip to content

Replace the website with a daily cross-environment test dashboard built around promotion drift #108

Replace the website with a daily cross-environment test dashboard built around promotion drift

Replace the website with a daily cross-environment test dashboard built around promotion drift #108

Workflow file for this run

name: Tests
on:
pull_request:
# Only checkout needs the token. Declaring this at all matters: every scope not
# listed here is set to none, so the job no longer inherits whatever the org's
# default-permissions setting happens to be. The unit tests themselves need no
# GitHub API access — `-m unit` deselects the issue tests before they look for a
# token — so anything beyond contents:read would be unused.
permissions:
contents: read
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
# To run the GitHub issue tests here too — drop the `-m unit` filter, or
# add a second job running `uv run pytest tests/github_issues` — put back:
#
# env:
# GITHUB_TOKEN: ${{ github.token }}
#
# and add `issues: read` to the permissions block above. Do not skip the
# env: block — without a token the issue tests skip at the module level
# rather than failing, so CI would go green having tested nothing.
#
# The token covers this repository only: the other repos in targets.ini's
# Repositories list are readable because they are public, not because the
# token is scoped to them, so adding a private one would mean a PAT in a
# secret instead.
- name: Run unit tests
run: uv run pytest -m unit -v
website-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Node 24 for npm 11: the lockfile npm 11 writes omits `optional: true` on
# platform-specific packages, and npm 10 then refuses to install it
# (EBADPLATFORM on lightningcss-android-arm64). Keep this in step with the
# same block in dashboard.yaml.
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
cache-dependency-path: website/package-lock.json
# The dashboard's URL round-tripping, filtering and pagination: logic the
# Python tests cannot see, and where a shared link quietly losing its page
# looks like nothing is wrong.
- name: Run the website unit tests
working-directory: website
run: |
npm ci
npm test