1
1
# Github actions workflow name
2
- name : Nodejs Test
2
+ name : CI
3
3
4
4
# Triggers the workflow on push or pull request events
5
5
on :
9
9
branches : [main, master]
10
10
11
11
jobs :
12
- platform_spec_test :
13
- name : ' Tests on ${{matrix.os}} with node${{matrix.node}}'
12
+ basic_node_test :
13
+ name : ' Basic tests on ubuntu-latest with nodejs v22 (current LTS version)'
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - uses : actions/checkout@v2
17
+ - uses : actions/setup-node@v2
18
+ with :
19
+ node-version : ${{ matrix.node }}
20
+ - name : Install npm dependencies
21
+ run : npm install
22
+ - name : Print put node & npm version
23
+ run : node --version && npm --version
24
+ - name : Install chromium
25
+ run : npx playwright install chromium
26
+ - name : Run unit test
27
+ run : npm run test
28
+
29
+ windows_and_macos_test :
30
+ name : ' Platform tests on ${{matrix.os}} with nodejs v${{matrix.node}}'
31
+ needs : basic_node_test
14
32
strategy :
15
33
matrix :
16
34
# Test all mainstream operating system
17
- os : [ubuntu-latest, macos-latest, windows-latest]
18
- node : [18 ]
35
+ os : [macos-latest, windows-latest]
36
+ node : [22 ]
19
37
runs-on : ${{ matrix.os }}
20
38
steps :
21
39
# Pull repo to test machine
@@ -30,15 +48,18 @@ jobs:
30
48
- name : Print put node & npm version
31
49
# Output useful info for debugging.
32
50
run : node --version && npm --version
51
+ - name : Install chromium
52
+ run : npx playwright install chromium
33
53
- name : Run unit test
34
54
run : npm run test
35
55
36
- fast_node_test :
37
- name : ' Tests on ${{matrix.os}} with node${{matrix.node}}'
56
+ historical_versions_node_test :
57
+ name : ' Historical version nodejs v${{matrix.node}} test'
58
+ needs : basic_node_test
38
59
strategy :
39
60
matrix :
40
61
os : [ubuntu-latest]
41
- node : [10, 12, 14, 16, 20]
62
+ node : [14, 16, 18 , 20]
42
63
runs-on : ${{ matrix.os }}
43
64
steps :
44
65
- uses : actions/checkout@v2
49
70
run : npm install
50
71
- name : Print put node & npm version
51
72
run : node --version && npm --version
73
+ - name : Install chromium
74
+ run : npx playwright install chromium
75
+ - name : Run unit test
76
+ run : npm run test
77
+
78
+ allow_failure_testing_for_node23 :
79
+ name : ' Allow failure for nodejs v23 tests'
80
+ needs : basic_node_test
81
+ runs-on : ubuntu-latest
82
+ steps :
83
+ - uses : actions/checkout@v2
84
+ - uses : actions/setup-node@v2
85
+ with :
86
+ node-version : 23
87
+ - name : Install npm dependencies
88
+ run : npm install
89
+ - name : Print put node & npm version
90
+ run : node --version && npm --version
91
+ - name : Install chromium
92
+ run : npx playwright install chromium
52
93
- name : Run unit test
53
94
run : npm run test
0 commit comments