-
Notifications
You must be signed in to change notification settings - Fork 406
66 lines (60 loc) · 1.59 KB
/
test.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Test
on:
push:
pull_request:
merge_group:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# https://nodejs.org/en/about/releases/
node: [ '18', '20', '20.12.2', '22' ]
fail-fast: false
name: Node.js ${{ matrix.node }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
architecture: x64
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- name: Install Dependency
run: npm ci
- name: Test generator
run: cd generator; mvn package; cd ..
- name: Generate code
run: |
python3 generate-code.py
- name: Test Project
run: export NODE_OPTIONS=--max-old-space-size=6144; npm test
- name: Test building apidocs
run: export NODE_OPTIONS=--openssl-legacy-provider; npm run apidocs
- name: Test building docs
run: export NODE_OPTIONS=--openssl-legacy-provider; npm run docs:build
- name: Test building examples (CJS)
run: |
cd examples/echo-bot-ts-cjs
npm run build-sdk
npm install
npm run build
cd -
- name: Test building examples (ESM)
run: |
cd examples/echo-bot-ts-esm
npm run build-sdk
npm install
npm run build
cd -
- name: publint
run: npx publint
- name: validate package
run: npx @arethetypeswrong/cli $(npm pack)