Skip to content

Commit 76d61c8

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

File tree

2 files changed

+26
-20
lines changed

2 files changed

+26
-20
lines changed

.github/workflows/npm-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ jobs:
3030
- name: Build package
3131
run: npm run build
3232

33-
- name: Run jest tests
34-
run: npm run jest
33+
- name: Run tests
34+
run: npm test
3535

3636
- name: Upload coverage reports to Codecov
3737
uses: codecov/codecov-action@v5

.github/workflows/reusable-test.yml

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,20 @@ jobs:
3232
- name: Install dependencies
3333
run: npm ci
3434

35-
- name: Run tests
35+
- name: Run modern jest tests
3636
run: npm run task:jest
3737

38-
# Run legacy tests on multiple matrix Node.js versions
39-
run-tests-legacy-node7-13:
38+
- name: Run e2e tests
39+
run: npm run e2e
40+
41+
# Run tests on multiple matrix Node.js versions
42+
run-tests-modern-nodes:
4043
if: ${{ inputs.use-matrix == true }}
4144
runs-on: ubuntu-latest
42-
needs: build-node7-13
45+
needs: build-modern
4346
strategy:
4447
matrix:
45-
node-version: [7.x, 8.x, 9.x, 10.x, 11.x, 12.x, 13.x]
48+
node-version: [16.x, 17.x, 18.x, 19.x, 20.x, 21.x, 22.x, 23.x]
4649
steps:
4750
- uses: actions/checkout@v4
4851

@@ -51,17 +54,18 @@ jobs:
5154
with:
5255
path: |
5356
node_modules
54-
tslib
55-
lib
56-
key: ${{ runner.os }}-build-node7-13-${{ github.sha }}
57+
key: ${{ runner.os }}-build-modern-${{ github.sha }}
5758

5859
- name: Use Node.js ${{ matrix.node-version }}
5960
uses: actions/setup-node@v4
6061
with:
6162
node-version: ${{ matrix.node-version }}
6263

63-
- name: Run tests
64-
run: npm run task:jest:legacy
64+
- name: Run modern jest tests
65+
run: npm run task:jest
66+
67+
- name: Run e2e tests
68+
run: npm run e2e
6569

6670
# Run legacy tests on multiple matrix Node.js versions
6771
run-tests-legacy-node14-15:
@@ -88,17 +92,17 @@ jobs:
8892
with:
8993
node-version: ${{ matrix.node-version }}
9094

91-
- name: Run tests
95+
- name: Run legacy jest tests
9296
run: npm run task:jest:legacy
9397

94-
# Run tests on multiple matrix Node.js versions
95-
run-tests-modern-nodes:
98+
# Run legacy tests on multiple matrix Node.js versions
99+
run-tests-legacy-node7-13:
96100
if: ${{ inputs.use-matrix == true }}
97101
runs-on: ubuntu-latest
98-
needs: build-modern
102+
needs: build-node7-13
99103
strategy:
100104
matrix:
101-
node-version: [16.x, 17.x, 18.x, 19.x, 20.x, 21.x, 22.x, 23.x]
105+
node-version: [7.x, 8.x, 9.x, 10.x, 11.x, 12.x, 13.x]
102106
steps:
103107
- uses: actions/checkout@v4
104108

@@ -107,15 +111,17 @@ jobs:
107111
with:
108112
path: |
109113
node_modules
110-
key: ${{ runner.os }}-build-modern-${{ github.sha }}
114+
tslib
115+
lib
116+
key: ${{ runner.os }}-build-node7-13-${{ github.sha }}
111117

112118
- name: Use Node.js ${{ matrix.node-version }}
113119
uses: actions/setup-node@v4
114120
with:
115121
node-version: ${{ matrix.node-version }}
116122

117-
- name: Run tests
118-
run: npm run task:jest
123+
- name: Run legacy jest tests
124+
run: npm run task:jest:legacy
119125

120126
# This job is used to run tests on legacy Node.js versions
121127
# 1. Use default Node.js

0 commit comments

Comments
 (0)