1- name : ' CI build & test'
1+ name : ' Verify, build & test'
22
33on :
44 push :
99permissions : read-all
1010
1111jobs :
12- Build :
12+ job-verify-formatting :
13+ permissions :
14+ contents : read
15+ runs-on : blacksmith-4vcpu-ubuntu-2204
16+ steps :
17+ - name : Harden Runner
18+ uses : step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
19+ with :
20+ egress-policy : audit
21+
22+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
23+
24+ - name : Setup Node
25+ uses : useblacksmith/setup-node@65c6ca86fdeb0ab3d85e78f57e4f6a7e4780b391 # v5.0.4
26+ with :
27+ node-version : ' 24.x'
28+
29+ - name : Install dependencies
30+ run : yarn install --frozen-lockfile
31+
32+ - name : Verify formatting
33+ run : yarn test-format-only
34+
35+ job-build :
36+ needs : [job-verify-formatting]
1337 permissions :
1438 contents : write
1539 runs-on : blacksmith-4vcpu-ubuntu-2204
@@ -21,34 +45,38 @@ jobs:
2145
2246 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2347
24- - name : Build from src
48+ - name : Setup Node
2549 uses : useblacksmith/setup-node@65c6ca86fdeb0ab3d85e78f57e4f6a7e4780b391 # v5.0.4
2650 with :
27- node-version : ' 22.x'
51+ node-version : ' 24.x'
52+
53+ - name : Install dependencies
54+ run : yarn install --frozen-lockfile
2855
29- - run : yarn install --frozen-lockfile
30- - run : yarn build-only
56+ - name : Build project
57+ run : yarn build-only
3158
3259 - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
3360 with :
3461 name : dist
3562 path : dist/
3663
37- - run : tar -cvf node_modules.tar node_modules
64+ - name : Package node_modules
65+ run : tar --exclude='.cache' -cvf node_modules.tar node_modules
3866
3967 - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
4068 with :
4169 name : node_modules
4270 path : node_modules.tar
4371
44- test_node :
72+ job-test-node :
4573 permissions :
4674 contents : read
47- needs : Build
75+ needs : [job-verify-formatting, job-build]
4876 runs-on : blacksmith-4vcpu-ubuntu-2204
4977 strategy :
5078 matrix :
51- node-version : [16.x, 18.x, 20.x, 22.x, 23.x, latest]
79+ node-version : [16.x, 18.x, 20.x, 22.x, 23.x, 24.x, latest]
5280 steps :
5381 - name : Harden Runner
5482 uses : step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
5785
5886 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5987
60- - name : Run prod version with Node v${{ matrix.node-version }}
88+ - name : Setup Node
6189 uses : useblacksmith/setup-node@65c6ca86fdeb0ab3d85e78f57e4f6a7e4780b391 # v5.0.4
6290 with :
6391 node-version : ${{ matrix.node-version }}
@@ -72,13 +100,16 @@ jobs:
72100 name : node_modules
73101 path : ./
74102
75- - run : tar -xvf node_modules.tar
76- - run : yarn test-ci
103+ - name : Unpack node_modules
104+ run : tar -xvf node_modules.tar
77105
78- test_browser :
106+ - name : Run Node tests
107+ run : yarn test-ci
108+
109+ job-test-browser :
79110 permissions :
80111 contents : read
81- needs : Build
112+ needs : [job-verify-formatting, job-build]
82113 runs-on : blacksmith-4vcpu-ubuntu-2204
83114 steps :
84115 - name : Harden Runner
93124 name : dist
94125 path : dist/
95126
96- - run : echo '::warning ::Not able to automate browser tests yet'
97- - run : ' # yarn test-browser-ci'
127+ - name : Placeholder for browser tests
128+ run : echo '::warning ::Not able to automate browser tests yet'
129+
130+ - name : Run browser tests (disabled)
131+ run : ' # yarn test-browser-ci'
0 commit comments