1- # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2- # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
41name : Test
52
63on :
96 pull_request :
107 branches : [main]
118
9+ permissions :
10+ contents : read
11+
1212jobs :
1313 test :
1414 name : Unit tests
1515 runs-on : ubuntu-latest
1616 steps :
17- - uses : actions/checkout@v6
17+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
18+ with :
19+ persist-credentials : false
20+ - uses : pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
1821 - name : Use Node.js
19- uses : actions/setup-node@v6
22+ uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
2023 with :
21- cache : ' npm'
22- node-version : 22
23- - name : Install dependencies
24- run : npm ci --ignore-scripts --no-audit --no-fund
24+ node-version : 24
25+ cache : pnpm
26+ - run : pnpm install --frozen-lockfile --ignore-scripts
2527 - name : Install Playwright Browsers
26- run : npx playwright install chromium --only-shell
27- - run : npm test -- --forbid-only
28+ run : pnpm exec playwright install chromium --only-shell
29+ - run : pnpm test -- --forbid-only
2830 - name : Upload coverage reports to Codecov
29- uses : codecov/codecov-action@v6
31+ uses : codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5
3032 with :
3133 token : ${{ secrets.CODECOV_TOKEN }}
3234
3335 check-ts :
3436 name : Check types
3537 runs-on : ubuntu-latest
3638 steps :
37- - uses : actions/checkout@v6
39+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
40+ with :
41+ persist-credentials : false
42+ - uses : pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
3843 - name : Use Node.js
39- uses : actions/setup-node@v6
44+ uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
4045 with :
41- cache : ' npm '
42- node-version : 22
43- - run : npm ci --ignore-scripts --no-audit --no-fund
44- - run : npm run check
46+ node-version : 24
47+ cache : pnpm
48+ - run : pnpm install --frozen-lockfile --ignore-scripts
49+ - run : pnpm run check
4550
4651 lint-code :
4752 name : Lint code (oxlint)
4853 runs-on : ubuntu-latest
4954 steps :
50- - uses : actions/checkout@v6
55+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
56+ with :
57+ persist-credentials : false
58+ - uses : pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
5159 - name : Use Node.js
52- uses : actions/setup-node@v6
60+ uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
5361 with :
54- cache : ' npm '
55- node-version : 22
56- - run : npm ci --ignore-scripts --no-audit --no-fund
57- - run : npm run lint
62+ node-version : 24
63+ cache : pnpm
64+ - run : pnpm install --frozen-lockfile --ignore-scripts
65+ - run : pnpm run lint
5866
5967 declutter-code :
6068 name : Declutter code (Knip)
6169 runs-on : ubuntu-latest
6270 steps :
63- - uses : actions/checkout@v6
71+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
72+ with :
73+ persist-credentials : false
74+ - uses : pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
6475 - name : Use Node.js
65- uses : actions/setup-node@v6
76+ uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
6677 with :
67- cache : ' npm '
68- node-version : 22
69- - run : npm ci --ignore-scripts --no-audit --no-fund
70- - run : npm run knip
78+ node-version : 24
79+ cache : pnpm
80+ - run : pnpm install --frozen-lockfile --ignore-scripts
81+ - run : pnpm run knip
7182
7283 bundle-analysis :
7384 name : Report bundle analysis (codecov)
7485 runs-on : ubuntu-latest
7586 steps :
76- - uses : actions/checkout@v6
77- - uses : actions/setup-node@v6
87+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
88+ with :
89+ persist-credentials : false
90+ - uses : pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
91+ - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
7892 with :
79- cache : ' npm '
80- node-version : 22
81- - run : npm ci --ignore-scripts --no-audit --no-fund
82- - run : npm run build
93+ node-version : 24
94+ cache : pnpm
95+ - run : pnpm install --frozen-lockfile --ignore-scripts
96+ - run : pnpm run build
8397 env :
8498 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
8599
@@ -88,10 +102,12 @@ jobs:
88102 runs-on : ubuntu-latest
89103 steps :
90104 - name : Checkout code
91- uses : actions/checkout@v6
105+ uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
106+ - uses : pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
92107 - name : Use Node.js
93- uses : actions/setup-node@v6
108+ uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
94109 with :
95- cache : ' npm'
96- node-version : 22
97- - run : npm audit --audit-level=high
110+ node-version : 24
111+ cache : pnpm
112+ - run : pnpm install --frozen-lockfile --ignore-scripts
113+ - run : pnpm audit --audit-level=high
0 commit comments