Skip to content

Commit ccc94a6

Browse files
committed
fix: ci scripts
1 parent 76d61c8 commit ccc94a6

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed

.github/workflows/reusable-test.yml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ jobs:
3535
- name: Run modern jest tests
3636
run: npm run task:jest
3737

38-
- name: Run e2e tests
39-
run: npm run e2e
40-
4138
# Run tests on multiple matrix Node.js versions
4239
run-tests-modern-nodes:
4340
if: ${{ inputs.use-matrix == true }}
@@ -64,6 +61,32 @@ jobs:
6461
- name: Run modern jest tests
6562
run: npm run task:jest
6663

64+
# Run tests on multiple matrix Node.js versions
65+
run-e2e-tests:
66+
if: ${{ inputs.use-matrix == true }}
67+
runs-on: ubuntu-latest
68+
needs: build-modern
69+
steps:
70+
- uses: actions/checkout@v4
71+
72+
- name: Restore cache
73+
uses: actions/cache@v4
74+
with:
75+
path: |
76+
node_modules
77+
key: ${{ runner.os }}-build-modern-${{ github.sha }}
78+
79+
- name: Use Node.js ${{ vars.DEFAULT_NODE_VERSION }}
80+
uses: actions/setup-node@v4
81+
with:
82+
node-version: ${{ vars.DEFAULT_NODE_VERSION }}
83+
84+
- name: Run modern jest tests
85+
run: npm run task:jest
86+
87+
- name: Build package
88+
run: npm run build
89+
6790
- name: Run e2e tests
6891
run: npm run e2e
6992

@@ -146,7 +169,7 @@ jobs:
146169
- name: Install dependencies
147170
run: npm install --legacy-peer-deps --ignore-scripts --no-package-lock
148171

149-
- name: Build
172+
- name: Build lib
150173
run: npm run build:lib
151174

152175
- name: Cache build output
@@ -181,7 +204,7 @@ jobs:
181204
- name: Install dependencies
182205
run: npm install --legacy-peer-deps --ignore-scripts --no-package-lock
183206

184-
- name: Build
207+
- name: Build lib
185208
run: npm run build:lib
186209

187210
- name: Cache build output

0 commit comments

Comments
 (0)