Skip to content

Commit b85d96c

Browse files
committed
Do Node 22, but not 16
1 parent 2922acc commit b85d96c

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
name: CI
22

33
on:
4-
push:
5-
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
88

99
jobs:
10-
build-and-test:
11-
runs-on: ubuntu-latest
12-
13-
strategy:
14-
matrix:
15-
node-version: [16.x, 18.x, 20.x]
16-
17-
steps:
18-
- uses: actions/checkout@v3
19-
20-
- name: Use Node.js ${{ matrix.node-version }}
21-
uses: actions/setup-node@v3
22-
with:
23-
node-version: ${{ matrix.node-version }}
24-
cache: 'npm'
25-
26-
- name: Install dependencies
27-
run: npm ci
28-
29-
- name: Build
30-
run: npm run build
31-
32-
- name: Test
33-
run: npm test
34-
35-
- name: Verify dual module compatibility
36-
run: |
37-
node -e "require('./dist/index.js')" # Test CJS
38-
node --input-type=module -e "import * as mod from './dist/index.mjs'; console.log(typeof mod.convertJsonSchemaToZod === 'function')" # Test ESM
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x, 20.x, 22.x]
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: "npm"
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Build
30+
run: npm run build
31+
32+
- name: Test
33+
run: npm test
34+
35+
- name: Verify dual module compatibility
36+
run: |
37+
node -e "require('./dist/index.js')" # Test CJS
38+
node --input-type=module -e "import * as mod from './dist/index.mjs'; console.log(typeof mod.convertJsonSchemaToZod === 'function')" # Test ESM

0 commit comments

Comments
 (0)