Skip to content

web: add the scheduled Stryker mutation-testing workflow #190

Backlog

Description

@oly-agents

Summary

Add the scheduled Mutation Testing workflow for web/. #189 adds the StrykerJS configuration (web/stryker.config.mjs) and pnpm test:mutation. Oly workers cannot push files in .github/workflows/, so the workflow file is not in that PR.

What to do

  1. Commit the file below as .github/workflows/mutation.yml. This needs a person with workflow-write permission.
  2. Start it one time with workflow_dispatch. Make sure that the mutation-report artifact contains mutation.html and mutation.json.
  3. Change "Mutation testing" in web/README.md and the "Bundle size and mutation testing" list in web/AGENTS.md, so that they do not say that the workflow is pending.

The workflow runs every Monday at 04:00 UTC and on workflow_dispatch. It has no pull_request trigger. Do not make it a required check.

.github/workflows/mutation.yml:

name: Mutation Testing

# Not a PR check: do not add a pull_request trigger or make it required.
on:
  schedule:
    - cron: "0 4 * * 1" # Mondays 04:00 UTC
  workflow_dispatch:

permissions:
  contents: read

concurrency:
  group: mutation-testing
  cancel-in-progress: true

jobs:
  stryker:
    runs-on: ubuntu-latest
    timeout-minutes: 60
    defaults:
      run:
        working-directory: web
    steps:
      - uses: actions/checkout@v7
      - name: Setup pnpm and Node
        # Gets node version from web/.nvmrc and pnpm version from `packageManager` in web/package.json
        uses: pnpm/setup@v3
        with:
          working-directory: web
          cache: true
          install: false

      - name: Install dependencies
        run: pnpm install --frozen-lockfile

      - name: Run Stryker
        run: pnpm test:mutation

      - name: Upload mutation report
        if: always()
        uses: actions/upload-artifact@v7
        with:
          name: mutation-report
          path: |
            web/reports/mutation/mutation.html
            web/reports/mutation/mutation.json
          if-no-files-found: warn
          retention-days: 30

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions