Repository navigation
ci(mutation): run mutation testing on main through systemfsoftware's reusable workflow #22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| # The reusable release workflow dispatches this file on the release PR branch. | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # The @systemfsoftware tarballs the lockfile installs from, built by this | |
| # repository's flake from its pinned systemfsoftware and stryker-js-effect | |
| # commits. The tarballs are architecture-independent, so one build serves | |
| # every job below. | |
| sfs-deps: | |
| name: systemfsoftware tarballs from the flake | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: cachix/install-nix-action@13d8dd58da0234aa297dedd986986ccb8e7f3e24 # v31.11.1 | |
| - name: Build the tarballs the lockfile names | |
| run: cp -rL "$(nix build --no-link --print-out-paths .#sfs-deps)" .sfs-deps | |
| - name: The lockfile's recorded integrities match the flake's tarballs | |
| run: nix build --no-link .#checks.x86_64-linux.consumer-store | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: sfs-deps | |
| path: .sfs-deps/ | |
| retention-days: 1 | |
| include-hidden-files: true | |
| if-no-files-found: error | |
| # Lint, typecheck, build with attw, and the test jobs the planner packs from | |
| # recorded timings. Each phase runs .github/actions/checks-lane. | |
| checks: | |
| needs: sfs-deps | |
| permissions: | |
| contents: read | |
| actions: read | |
| uses: systemfsoftware/systemfsoftware/.github/workflows/reusable-checks.yml@732f66a0c85819b2005f9e0930a595bc4de91ee1 | |
| with: | |
| lanes: '[{"id": "lint", "name": "lint", "timeout-minutes": 60, "run": "pnpm lint"}, {"id": "typecheck", "name": "typecheck", "timeout-minutes": 60, "run": "pnpm typecheck"}, {"id": "build", "name": "build · attw", "timeout-minutes": 60, "run": "pnpm build && pnpm --filter @systemfsoftware/api-extractor attw"}]' | |
| timeout-minutes: 60 | |
| max-seconds: 600 | |
| plan-timeout-minutes: 60 | |
| host-bytes: | |
| name: Output bytes on ${{ matrix.arch }} | |
| needs: sfs-deps | |
| strategy: | |
| matrix: | |
| include: | |
| - arch: x86_64 | |
| runner: ubuntu-latest | |
| - arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: sfs-deps | |
| path: .sfs-deps | |
| - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 | |
| - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - name: Serialise a fixed-seed sample of models and verdicts | |
| run: node --conditions=@systemfsoftware/source apps/api-extractor-e2e/host-digest.ts > host-output.bin | |
| - run: sha256sum host-output.bin && uname -m | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: host-output-${{ matrix.arch }} | |
| path: host-output.bin | |
| host-compare: | |
| name: Same bytes on every host | |
| needs: host-bytes | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| pattern: host-output-* | |
| - run: sha256sum host-output-*/host-output.bin | |
| - name: Compare x86_64 and arm64 outputs byte for byte | |
| run: cmp host-output-x86_64/host-output.bin host-output-arm64/host-output.bin |