1616permissions : {}
1717
1818jobs :
19+ checks :
20+ name : build and typecheck (${{ matrix.os }})
21+ runs-on : ${{ matrix.os == 'ubuntu-latest' && github.repository == 'voidzero-dev/void' && 'blacksmith-4vcpu-ubuntu-2404' || matrix.os }}
22+ permissions :
23+ contents : read
24+ strategy :
25+ fail-fast : false
26+ matrix :
27+ os : ' ${{ ((github.event_name == '' push'' || contains(github.event.pull_request.labels.*.name, '' test: windows'' )) && !inputs.skip_windows) && fromJSON('' ["ubuntu-latest","windows-latest"]'' ) || fromJSON('' ["ubuntu-latest"]'' ) }}'
28+ steps :
29+ - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
30+ with :
31+ persist-credentials : false
32+ - uses : ./.github/actions/test-setup
33+ # Build every playground once per OS for complete build/type coverage.
34+ # Integration tests build their own selected fixtures in separate checkouts.
35+ - run : vp run build:all
36+ - run : vp run check
37+
1938 test :
2039 name : test (${{ matrix.os }}, ${{ matrix.shard }})
2140 runs-on : ${{ matrix.os == 'ubuntu-latest' && github.repository == 'voidzero-dev/void' && 'blacksmith-4vcpu-ubuntu-2404' || matrix.os }}
@@ -30,52 +49,16 @@ jobs:
3049 # Windows runs on branch/tag pushes and on PRs labeled "test: windows",
3150 # unless a reusable workflow caller explicitly disables it.
3251 os : ' ${{ ((github.event_name == '' push'' || contains(github.event.pull_request.labels.*.name, '' test: windows'' )) && !inputs.skip_windows) && fromJSON('' ["ubuntu-latest","windows-latest"]'' ) || fromJSON('' ["ubuntu-latest"]'' ) }}'
33- # Unit tests and two integration shards run on separate runners. Each integration
34- # shard builds its own checkout first, so generated playground state is never shared .
52+ # Weighted integration shards own separate checkouts and build only the
53+ # fixtures they exercise. No generated playground state crosses runners .
3554 shard : [unit, '1/2', '2/2']
3655 steps :
3756 - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
3857 with :
3958 persist-credentials : false
40- # Defender's real-time scan is synchronous on every file write, and this suite writes a lot of
41- # them (dependency install, ~26 playground builds, per-worker temp dirs). Excluding the paths
42- # we generate is purely a speed measure: it never changes what runs.
43- #
44- # Skipped for fork pull requests, the only case where the checkout is code no maintainer has
45- # pushed. Not because scanning is a boundary for this job — it has no secrets, a read-only
46- # token, an ephemeral runner, and already executes the PR's own build and test code by design
47- # — but because leaving the scan on for untrusted checkouts costs us nothing: Windows runs on
48- # a PR only when a maintainer applies the `test: windows` label, so this is rare, while main
49- # pushes and maintainer branches (the everyday path) keep the speedup.
50- #
51- # Warns instead of failing, so a runner image that refuses the call still runs the suite.
52- - name : Exclude build paths from Windows Defender
53- if : >-
54- ${{ contains(matrix.os, 'windows')
55- && (github.event_name == 'push'
56- || github.event.pull_request.head.repo.full_name == github.repository) }}
57- shell : pwsh
58- run : |
59- foreach ($path in @('${{ github.workspace }}', '${{ runner.temp }}')) {
60- try {
61- Add-MpPreference -ExclusionPath $path -ErrorAction Stop
62- Write-Host "Defender exclusion added: $path"
63- } catch {
64- Write-Host "::warning::could not add Defender exclusion for ${path}: $_"
65- }
66- }
67-
68- - uses : voidzero-dev/setup-vp@2dec1e33f4ab2c6d5bce1b0c4607961bb1a3f7a1 # v1.12.0
59+ - uses : ./.github/actions/test-setup
6960 with :
70- node-version-file : .node-version
71- cache : true
72-
73- # The upstream Linux image and Windows already provide browser libraries.
74- # Forks use GitHub's Ubuntu image and install Chromium's system dependencies.
75- - run : vp exec playwright install chromium
76- if : ${{ matrix.shard != 'unit' && (runner.os != 'Linux' || github.repository == 'voidzero-dev/void') }}
77- - run : vp exec playwright install --with-deps chromium
78- if : ${{ matrix.shard != 'unit' && runner.os == 'Linux' && github.repository != 'voidzero-dev/void' }}
61+ browser : ${{ matrix.shard != 'unit' }}
7962
8063 - run : vp check
8164 if : ${{ matrix.shard == 'unit' }}
8972 - run : vp test run --project unit
9073 if : ${{ matrix.shard == 'unit' }}
9174
92- - run : vp run build:all
75+ - run : vp run build
9376 if : ${{ matrix.shard != 'unit' }}
9477
95- - run : vp run check
96- if : ${{ matrix.shard == '1/2' }}
97-
9878 - run : vp test run --project parallel-integration --shard=${{ matrix.shard }}
9979 if : ${{ matrix.shard != 'unit' }}
10080
@@ -143,6 +123,7 @@ jobs:
143123 runs-on : ubuntu-latest
144124 if : always()
145125 needs :
126+ - checks
146127 - test
147128 - live-e2e
148129 steps :
0 commit comments