3838 matrix :
3939 node-version : [22.x]
4040 steps :
41- # Common setup steps
42- - &setup-steps
43- - uses : actions/checkout@v4
44- - name : Use Node.js ${{ matrix.node-version }}
45- uses : actsetup-node@v4
46- with :
47- node-version : ${{ matrix.node-version }}
48- - name : Cache npm
49- uses : actions/cache@v4
50- with :
51- path : ~/.npm
52- key : ${{ runner.os }}-node-${{ matrix.node-version }}-npm-${{ hashFiles('react/package-lock.json') }}
53- restore-keys : |
54- ${{ runner.os }}-node-${{ matrix.node-version }}-npm-
55- - name : Install dependencies
56- run : npm install
57- working-directory : react
58- - *setup-steps
41+ - uses : ./.github/workflows/common-setup.yml
42+ with :
43+ node-version : ${{ matrix.node-version }}
5944 - name : Build
6045 run : npm run build
6146 working-directory : react
7358 matrix :
7459 node-version : [22.x]
7560 steps :
76- - *setup-steps
61+ - uses : ./.github/workflows/common-setup.yml
62+ with :
63+ node-version : ${{ matrix.node-version }}
7764 - name : Audit
7865 run : npm run audit
7966 working-directory : react
8976 matrix :
9077 node-version : [22.x]
9178 steps :
92- - *setup-steps
79+ - uses : ./.github/workflows/common-setup.yml
80+ with :
81+ node-version : ${{ matrix.node-version }}
9382 - name : Run unit tests with coverage
9483 run : npm run test:CI
9584 working-directory : react
@@ -113,7 +102,9 @@ jobs:
113102 matrix :
114103 node-version : [22.x]
115104 steps :
116- - *setup-steps
105+ - uses : ./.github/workflows/common-setup.yml
106+ with :
107+ node-version : ${{ matrix.node-version }}
117108 - name : Run duplication analysis
118109 run : npm run duplication
119110 working-directory : react
@@ -137,7 +128,9 @@ jobs:
137128 with :
138129 name : react-build
139130 path : ./react/build
140- - *setup-steps
131+ - uses : ./.github/workflows/common-setup.yml
132+ with :
133+ node-version : ${{ matrix.node-version }}
141134 - name : Install Playwright
142135 run : npx playwright install --with-deps
143136 working-directory : react
@@ -159,7 +152,9 @@ jobs:
159152 matrix :
160153 node-version : [22.x]
161154 steps :
162- - *setup-steps
155+ - uses : ./.github/workflows/common-setup.yml
156+ with :
157+ node-version : ${{ matrix.node-version }}
163158 - name : Run Stryker tests
164159 run : npx stryker run
165160 working-directory : react
0 commit comments