Skip to content

Commit 3822c71

Browse files
committed
fix: ci scripts
1 parent f3a325d commit 3822c71

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

.github/workflows/reusable-test.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ jobs:
3636
run: npm run task:jest
3737

3838
# Run legacy tests on multiple matrix Node.js versions
39-
run-tests-legacy-node7to13:
39+
run-tests-legacy-node7-13:
4040
if: ${{ inputs.use-matrix == true }}
4141
runs-on: ubuntu-latest
42-
needs: build-node7to13
42+
needs: build-node7-13
4343
strategy:
4444
matrix:
4545
node-version: [7.x, 8.x, 9.x, 10.x, 11.x, 12.x, 13.x]
@@ -53,9 +53,9 @@ jobs:
5353
node_modules
5454
tslib
5555
lib
56-
key: ${{ runner.os }}-build-node7to13-${{ github.sha }}
56+
key: ${{ runner.os }}-build-node7-13-${{ github.sha }}
5757
restore-keys: |
58-
${{ runner.os }}-build-node7to13-
58+
${{ runner.os }}-build-node7-13-
5959
6060
- name: Use Node.js ${{ matrix.node-version }}
6161
uses: actions/setup-node@v4
@@ -66,10 +66,10 @@ jobs:
6666
run: npm run task:jest:legacy
6767

6868
# Run legacy tests on multiple matrix Node.js versions
69-
run-tests-legacy-node14to15:
69+
run-tests-legacy-node14-15:
7070
if: ${{ inputs.use-matrix == true }}
7171
runs-on: ubuntu-latest
72-
needs: build-node14to15
72+
needs: build-node14-15
7373
strategy:
7474
matrix:
7575
node-version: [14.x, 15.x]
@@ -83,9 +83,9 @@ jobs:
8383
node_modules
8484
tslib
8585
lib
86-
key: ${{ runner.os }}-build-node14to15-${{ github.sha }}
86+
key: ${{ runner.os }}-build-node14-15-${{ github.sha }}
8787
restore-keys: |
88-
${{ runner.os }}-build-node14to15-
88+
${{ runner.os }}-build-node14-15-
8989
9090
- name: Use Node.js ${{ matrix.node-version }}
9191
uses: actions/setup-node@v4
@@ -128,7 +128,7 @@ jobs:
128128
# 2. Install older versions of jest and ts-jest
129129
# 3. Build the project
130130
# 4. Cache node_modules and tslib
131-
build-node7to13:
131+
build-node7-13:
132132
if: ${{ inputs.use-matrix == true }}
133133
runs-on: ubuntu-latest
134134
steps:
@@ -141,7 +141,7 @@ jobs:
141141
cache: 'npm'
142142

143143
- name: Downgrade legacy dependencies
144-
run: npm run prepare-legacy-node13
144+
run: npm run package-legacy-node7-13
145145

146146
- name: Install dependencies
147147
run: npm install --legacy-peer-deps --ignore-scripts --no-package-lock
@@ -156,16 +156,16 @@ jobs:
156156
node_modules
157157
tslib
158158
lib
159-
key: ${{ runner.os }}-build-node7to13-${{ github.sha }}
159+
key: ${{ runner.os }}-build-node7-13-${{ github.sha }}
160160
restore-keys: |
161-
${{ runner.os }}-build-node7to13-
161+
${{ runner.os }}-build-node7-13-
162162
163163
# This job is used to run tests on legacy Node.js versions
164164
# 1. Use default Node.js
165165
# 2. Install older versions of jest and ts-jest
166166
# 3. Build the project
167167
# 4. Cache node_modules and tslib
168-
build-node14to15:
168+
build-node14-15:
169169
if: ${{ inputs.use-matrix == true }}
170170
runs-on: ubuntu-latest
171171
steps:
@@ -178,7 +178,7 @@ jobs:
178178
cache: 'npm'
179179

180180
- name: Downgrade legacy dependencies
181-
run: npm run prepare-legacy-node15
181+
run: npm run prepare-legacy-node14-15
182182

183183
- name: Install dependencies
184184
run: npm install --legacy-peer-deps --ignore-scripts --no-package-lock
@@ -193,9 +193,9 @@ jobs:
193193
node_modules
194194
tslib
195195
lib
196-
key: ${{ runner.os }}-build-node14to15-${{ github.sha }}
196+
key: ${{ runner.os }}-build-node14-15-${{ github.sha }}
197197
restore-keys: |
198-
${{ runner.os }}-build-node14to15-
198+
${{ runner.os }}-build-node14-15-
199199
200200
# This job is used to run tests on modern Node.js versions
201201
# 1. Use default Node.js

jest-legacy.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
module.exports = {
55
testEnvironment: 'node',
66
testMatch: ['<rootDir>/tslib/test/**/*.{spec,test}.js'],
7-
setupFilesAfterEnv: ['<rootDir>/tslib/test/jest.setup.js'],
7+
setupFiles: ['<rootDir>/tslib/test/jest.setup.js'],
88
collectCoverage: true,
99
collectCoverageFrom: ['<rootDir>/lib/**/*.js'],
1010
coveragePathIgnorePatterns: ['<rootDir>/lib/types.js'],

0 commit comments

Comments
 (0)