@@ -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-node13 :
39+ run-tests-legacy-node7to13 :
4040 if : ${{ inputs.use-matrix == true }}
4141 runs-on : ubuntu-latest
42- needs : build-node13
42+ needs : build-node7to13
4343 strategy :
4444 matrix :
4545 node-version : [7.x, 8.x, 9.x, 10.x, 11.x, 12.x, 13.x]
@@ -53,26 +53,23 @@ jobs:
5353 node_modules
5454 tslib
5555 lib
56- key : ${{ runner.os }}-build-node13 -${{ github.sha }}
56+ key : ${{ runner.os }}-build-node7to13 -${{ github.sha }}
5757 restore-keys : |
58- ${{ runner.os }}-build-node13 -
58+ ${{ runner.os }}-build-node7to13 -
5959
6060 - name : Use Node.js ${{ matrix.node-version }}
6161 uses : actions/setup-node@v4
6262 with :
6363 node-version : ${{ matrix.node-version }}
6464
65- - name : Build typescript to tslib
66- run : npm run ts2lib
67-
6865 - name : Run tests
6966 run : npm run task:jest:legacy
7067
7168 # Run legacy tests on multiple matrix Node.js versions
72- run-tests-legacy-node15 :
69+ run-tests-legacy-node14to15 :
7370 if : ${{ inputs.use-matrix == true }}
7471 runs-on : ubuntu-latest
75- needs : build-node15
72+ needs : build-node14to15
7673 strategy :
7774 matrix :
7875 node-version : [14.x, 15.x]
@@ -86,18 +83,15 @@ jobs:
8683 node_modules
8784 tslib
8885 lib
89- key : ${{ runner.os }}-build-node15 -${{ github.sha }}
86+ key : ${{ runner.os }}-build-node14to15 -${{ github.sha }}
9087 restore-keys : |
91- ${{ runner.os }}-build-node15 -
88+ ${{ runner.os }}-build-node14to15 -
9289
9390 - name : Use Node.js ${{ matrix.node-version }}
9491 uses : actions/setup-node@v4
9592 with :
9693 node-version : ${{ matrix.node-version }}
9794
98- - name : Build typescript to tslib
99- run : npm run ts2lib
100-
10195 - name : Run tests
10296 run : npm run task:jest:legacy
10397
@@ -134,7 +128,7 @@ jobs:
134128 # 2. Install older versions of jest and ts-jest
135129 # 3. Build the project
136130 # 4. Cache node_modules and tslib
137- build-node13 :
131+ build-node7to13 :
138132 if : ${{ inputs.use-matrix == true }}
139133 runs-on : ubuntu-latest
140134 steps :
@@ -147,7 +141,7 @@ jobs:
147141 cache : ' npm'
148142
149143 - name : Downgrade legacy dependencies
150- run : npm run prepare-legacy-node13
144+ run : npm run prepare-legacy-node7to13
151145
152146 - name : Install dependencies
153147 run : npm install --legacy-peer-deps --ignore-scripts --no-package-lock
@@ -162,16 +156,16 @@ jobs:
162156 node_modules
163157 tslib
164158 lib
165- key : ${{ runner.os }}-build-node13 -${{ github.sha }}
159+ key : ${{ runner.os }}-build-node7to13 -${{ github.sha }}
166160 restore-keys : |
167- ${{ runner.os }}-build-node13 -
161+ ${{ runner.os }}-build-node7to13 -
168162
169163 # This job is used to run tests on legacy Node.js versions
170164 # 1. Use default Node.js
171165 # 2. Install older versions of jest and ts-jest
172166 # 3. Build the project
173167 # 4. Cache node_modules and tslib
174- build-node15 :
168+ build-node14to15 :
175169 if : ${{ inputs.use-matrix == true }}
176170 runs-on : ubuntu-latest
177171 steps :
@@ -184,7 +178,7 @@ jobs:
184178 cache : ' npm'
185179
186180 - name : Downgrade legacy dependencies
187- run : npm run prepare-legacy-node15
181+ run : npm run prepare-legacy-node14to15
188182
189183 - name : Install dependencies
190184 run : npm install --legacy-peer-deps --ignore-scripts --no-package-lock
@@ -199,9 +193,9 @@ jobs:
199193 node_modules
200194 tslib
201195 lib
202- key : ${{ runner.os }}-build-node15 -${{ github.sha }}
196+ key : ${{ runner.os }}-build-node14to15 -${{ github.sha }}
203197 restore-keys : |
204- ${{ runner.os }}-build-node15 -
198+ ${{ runner.os }}-build-node14to15 -
205199
206200 # This job is used to run tests on modern Node.js versions
207201 # 1. Use default Node.js
0 commit comments