name: Tests on: pull_request: push: workflow_dispatch: jobs: vitest: runs-on: ubuntu-latest strategy: fail-fast: false matrix: shard: [1, 2, 3, 4] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 with: version: 9 - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6 with: node-version: 24 cache: pnpm - run: pnpm install --frozen-lockfile # Run Vitest directly so `--shard` is parsed as an option - run: pnpm -s exec vitest run --coverage --shard ${{ matrix.shard }}/4 --pool forks - name: Upload coverage reports to Codecov uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage/lcov.info flags: vitest-shard-${{ matrix.shard }} name: vitest-shard-${{ matrix.shard }} fail_ci_if_error: true