File tree Expand file tree Collapse file tree 1 file changed +34
-15
lines changed Expand file tree Collapse file tree 1 file changed +34
-15
lines changed Original file line number Diff line number Diff line change 63
63
- name : Lint
64
64
run : |
65
65
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
+
68
83
runs-on : ${{ matrix.os }}
84
+ timeout-minutes : 5
85
+
69
86
steps :
70
87
- name : Checkout
71
88
uses : actions/checkout@v4
@@ -83,16 +100,18 @@ jobs:
83
100
- name : Test jest
84
101
run : npm run test:jest
85
102
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
You can’t perform that action at this time.
0 commit comments