Skip to content

Commit c05828e

Browse files
committed
ci(e2e): run end-to-end tests on macOS and Windows too
Previously, end-to-end tests only ran on Ubuntu. This adds macOS and Windows to the matrix, with fail-fast so a failure on one platform cancels the others early. Node 14 is skipped on macOS since it's unavailable on ARM runners. Windows needs the MSVC toolchain for the native fuzzer addon build.
1 parent c850664 commit c05828e

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

.github/workflows/run-all-tests-pr.yaml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,12 @@ jobs:
7676
- name: run all tests
7777
run: npm run test
7878
end-to-end:
79-
name: end-to-end
80-
runs-on: ubuntu-latest
79+
name: end-to-end (${{ matrix.os }})
80+
runs-on: ${{ matrix.os }}
81+
strategy:
82+
fail-fast: true
83+
matrix:
84+
os: [ubuntu-latest, macos-latest, windows-latest]
8185
steps:
8286
- name: checkout
8387
uses: actions/checkout@v3
@@ -87,36 +91,43 @@ jobs:
8791
with:
8892
node-version: 22
8993
cache: "npm"
94+
- name: MSVC (windows)
95+
uses: ilammy/msvc-dev-cmd@v1
96+
if: contains(matrix.os, 'windows')
9097
- name: pack jazzer.js
9198
run: cd end-to-end && ./package-jazzer-js.sh
99+
shell: bash
92100
- name: build example
93101
run: cd end-to-end && npm install --save-dev *.tgz && npm run build
102+
shell: bash
94103

95104
# Run with different node.js versions
96105
# all in one job to avoid rebuilding
97106
- name: "node 14"
107+
if: matrix.os != 'macos-latest'
98108
uses: actions/setup-node@v3
99109
with:
100110
node-version: 14
101-
cache: "npm"
102-
- name: run tests
111+
- name: run tests (node 14)
112+
if: matrix.os != 'macos-latest'
103113
run: cd end-to-end && npx jest
114+
shell: bash
104115

105116
- name: "node 20"
106117
uses: actions/setup-node@v3
107118
with:
108119
node-version: 20
109-
cache: "npm"
110-
- name: run tests
120+
- name: run tests (node 20)
111121
run: cd end-to-end && npx jest
122+
shell: bash
112123

113124
- name: "node 24"
114125
uses: actions/setup-node@v3
115126
with:
116127
node-version: 24
117-
cache: "npm"
118-
- name: run tests
128+
- name: run tests (node 24)
119129
run: cd end-to-end && npx jest
130+
shell: bash
120131
auto-merge:
121132
needs:
122133
- linting

0 commit comments

Comments
 (0)