-
Notifications
You must be signed in to change notification settings - Fork 13
43 lines (36 loc) · 1.1 KB
/
compileAndRuntime.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: compile-and-runtime-test
on: push
jobs:
doAll:
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci --registry=https://registry.npmjs.org/
- run: npm run build
- name: restore example2
working-directory: ./example2
run: npm ci --registry=https://registry.npmjs.org/
# test esm build-time
- name: build build-example2
working-directory: ./example2
run: npm run build
# test esm runtime
- name: runtime and api test example2
working-directory: ./example2
run: npm run runtest
- name: restore example
working-directory: ./example
run: npm ci --registry=https://registry.npmjs.org/
# test cjs runtime
- name: runtime and api test example
working-directory: ./example
run: npm run runtest