Repository navigation
Flake Hunt #106
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: Flake Hunt | |
| # Nightly hunt for order-dependent ("flaky under shuffle") unit tests. | |
| # Seeded shuffle is on in vitest.config.ts; this loops the `unit` project under | |
| # fresh random seeds and prints each seed so any failure reproduces exactly with | |
| # `vitest run --project unit --sequence.seed=<seed>`. | |
| # | |
| # Only the `unit` project is exercised, and unit tests are hermetic/mocked — so | |
| # no language toolchains (Python/Go/Java/...) are installed here. If a unit test | |
| # ever needs one, that is itself a hermeticity bug to fix, not a reason to add it. | |
| on: | |
| schedule: | |
| - cron: '0 7 * * *' # daily 07:00 UTC | |
| workflow_dispatch: | |
| inputs: | |
| runs: | |
| description: 'Number of seeded runs per OS' | |
| required: false | |
| default: '10' | |
| permissions: {} | |
| jobs: | |
| flake-hunt: | |
| name: Flake Hunt (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 | |
| # version comes from package.json "packageManager" (issue #478) | |
| - name: Setup Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: 22.x | |
| cache: 'pnpm' | |
| - name: Install Node dependencies | |
| run: pnpm install --frozen-lockfile | |
| env: | |
| SKIP_ADAPTER_VENDOR: 'true' | |
| - name: Build project (CI) | |
| run: pnpm run build:ci | |
| - name: Run flake hunt | |
| run: pnpm run test:flake | |
| env: | |
| CI: true | |
| # Hard-fail on process-listener leaks (issues #159/#183) | |
| LEAK_GUARD_STRICT: '1' | |
| FLAKE_RUNS: ${{ github.event.inputs.runs || '10' }} |