Skip to content

Commit f4d1b15

Browse files
authored
ci(test): use a single test job that we can require, independent of test matrix (#2581)
1 parent 7468cf1 commit f4d1b15

File tree

1 file changed

+34
-15
lines changed

1 file changed

+34
-15
lines changed

.github/workflows/continuous-integration.yaml

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,26 @@ jobs:
6363
- name: Lint
6464
run: |
6565
npm run lint:ts
66-
test:
67-
name: Test
66+
67+
# verify against ranges defined as supported in engines.node
68+
test_matrix:
69+
strategy:
70+
fail-fast: false
71+
matrix:
72+
node-version:
73+
- 10
74+
- 12
75+
- 14
76+
- 16
77+
- 18
78+
os:
79+
- macos-latest
80+
- ubuntu-latest
81+
- windows-latest
82+
6883
runs-on: ${{ matrix.os }}
84+
timeout-minutes: 5
85+
6986
steps:
7087
- name: Checkout
7188
uses: actions/checkout@v4
@@ -83,16 +100,18 @@ jobs:
83100
- name: Test jest
84101
run: npm run test:jest
85102
if: matrix.node-version >= 14
86-
strategy:
87-
fail-fast: false
88-
matrix:
89-
node-version:
90-
- 10
91-
- 12
92-
- 14
93-
- 16
94-
- 18
95-
os:
96-
- macos-latest
97-
- ubuntu-latest
98-
- windows-latest
103+
104+
# separate job to set as required in branch protection,
105+
# as the build names above change each time Node versions change
106+
test:
107+
runs-on: ubuntu-latest
108+
needs:
109+
- test_matrix
110+
if: ${{ !cancelled() }}
111+
steps:
112+
- name: All matrix versions passed
113+
if: ${{ !(contains(needs.*.result, 'failure')) }}
114+
run: exit 0
115+
- name: Some matrix version failed
116+
if: ${{ contains(needs.*.result, 'failure') }}
117+
run: exit 1

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy