Skip to content

Commit 5cb7938

Browse files
committed
ci(end-to-end): test jazzer CLI across node versions
- before this, only jest was tested
1 parent b756e92 commit 5cb7938

3 files changed

Lines changed: 32 additions & 12 deletions

File tree

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

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -107,55 +107,56 @@ jobs:
107107

108108
# Run with different node.js versions
109109
# all in one job to avoid rebuilding
110+
# each runtime executes consolidated runtime checks
110111
# Node 14 only has binaries for x64 runners
111112
- name: "node 14"
112113
if: matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest'
113114
uses: actions/setup-node@v6
114115
with:
115116
node-version: 14
116-
- name: run tests (node 14)
117+
- name: run runtime checks (node 14)
117118
if: matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest'
118-
run: cd end-to-end && npx jest
119+
run: cd end-to-end && npm run test:runtime
119120
shell: bash
120121

121122
- name: "node 16"
122123
uses: actions/setup-node@v6
123124
with:
124125
node-version: 16
125-
- name: run tests (node 16)
126-
run: cd end-to-end && npx jest
126+
- name: run runtime checks (node 16)
127+
run: cd end-to-end && npm run test:runtime
127128
shell: bash
128129

129130
- name: "node 18"
130131
uses: actions/setup-node@v6
131132
with:
132133
node-version: 18
133-
- name: run tests (node 18)
134-
run: cd end-to-end && npx jest
134+
- name: run runtime checks (node 18)
135+
run: cd end-to-end && npm run test:runtime
135136
shell: bash
136137

137138
- name: "node 20"
138139
uses: actions/setup-node@v6
139140
with:
140141
node-version: 20
141-
- name: run tests (node 20)
142-
run: cd end-to-end && npx jest
142+
- name: run runtime checks (node 20)
143+
run: cd end-to-end && npm run test:runtime
143144
shell: bash
144145

145146
- name: "node 22"
146147
uses: actions/setup-node@v6
147148
with:
148149
node-version: 22
149-
- name: run tests (node 22)
150-
run: cd end-to-end && npx jest
150+
- name: run runtime checks (node 22)
151+
run: cd end-to-end && npm run test:runtime
151152
shell: bash
152153

153154
- name: "node 24"
154155
uses: actions/setup-node@v6
155156
with:
156157
node-version: 24
157-
- name: run tests (node 24)
158-
run: cd end-to-end && npx jest
158+
- name: run runtime checks (node 24)
159+
run: cd end-to-end && npm run test:runtime
159160
shell: bash
160161
auto-merge:
161162
needs:

end-to-end/cli-smoke.cjs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* Copyright 2026 Code Intelligence GmbH
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
module.exports.fuzz = function fuzz() {};

end-to-end/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
"scripts": {
55
"build": "tsc",
66
"dryRun": "jest",
7+
"fuzz:cli": "jazzer cli-smoke.cjs --sync -- -runs=1 -seed=123456789 -max_len=32",
8+
"test:runtime": "npm run dryRun && npm run fuzz:cli",
79
"fuzz": "JAZZER_FUZZ=1 jest --coverage",
810
"coverage": "jest --coverage"
911
},

0 commit comments

Comments
 (0)