-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (37 loc) · 1.26 KB
/
ci.yml
File metadata and controls
47 lines (37 loc) · 1.26 KB
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
name: CI
on:
push:
branches: [main, init/ads-v1]
pull_request:
workflow_dispatch:
jobs:
validate-and-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: codegen/package-lock.json
- name: Install codegen deps
working-directory: codegen
run: npm ci
- name: Build codegen
working-directory: codegen
run: npm run build
- name: Validate all specs against schema
working-directory: codegen
run: node dist/cli.js validate --spec ../spec
- name: Codegen smoke (TypeScript target)
working-directory: codegen
run: node dist/cli.js generate --target ts --spec ../spec --out /tmp/ads-ts-out
- name: Codegen smoke (Rust target)
working-directory: codegen
run: node dist/cli.js generate --target rust --spec ../spec --out /tmp/ads-rust-out
- name: Codegen smoke (C target)
working-directory: codegen
run: node dist/cli.js generate --target c --spec ../spec --out /tmp/ads-c-out
- name: Run codegen unit tests
working-directory: codegen
run: npm test || echo "No tests yet"