-
Notifications
You must be signed in to change notification settings - Fork 29
78 lines (74 loc) · 2.08 KB
/
ci.yml
File metadata and controls
78 lines (74 loc) · 2.08 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
go:
name: Go (test + vet + build)
runs-on: ubuntu-latest
defaults:
run:
working-directory: go
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go/go.mod
cache-dependency-path: go/go.sum
- run: go vet ./...
- run: go build ./...
- run: go test ./... -race
ts:
name: TS (typecheck + test + build)
runs-on: ubuntu-latest
defaults:
run:
working-directory: ts
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: ts/package-lock.json
- run: npm ci
- run: npm run typecheck
- run: npm run build
- run: npm test
drift:
name: Contract codegen drift
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go/go.mod
cache-dependency-path: go/go.sum
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: ts/package-lock.json
- name: Regenerate Go bindings
working-directory: go
run: go generate ./...
- name: Check Go bindings in sync
run: |
if ! git diff --exit-code -- 'go/api/**/*.gen.go'; then
echo "::error::Go bindings are out of sync with contract/. Run 'go generate ./...' in go/ and commit the result."
exit 1
fi
- name: Install TS deps
working-directory: ts
run: npm ci
- name: Regenerate TS bindings
working-directory: ts
run: npm run generate
- name: Check TS bindings in sync
run: |
if ! git diff --exit-code -- 'ts/workflow-core/src/api/**'; then
echo "::error::TS bindings are out of sync with contract/. Run 'npm run generate' in ts/ and commit the result."
exit 1
fi