Skip to content

Commit 97c970d

Browse files
authored
chore(ci): add apidiff check for API compatibility (#123)
1 parent 53f93a8 commit 97c970d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/apidiff.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: apidiff
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
jobs:
8+
compat:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/setup-go@v4
12+
with:
13+
go-version: 1.21
14+
- run: go install golang.org/x/exp/cmd/apidiff@latest
15+
- uses: actions/checkout@v3
16+
with:
17+
ref: master
18+
- run: apidiff -w uuid.baseline .
19+
- uses: actions/checkout@v3
20+
with:
21+
clean: false
22+
- run: |
23+
apidiff -incompatible uuid.baseline . > diff.txt
24+
cat diff.txt && ! [ -s diff.txt ]

0 commit comments

Comments
 (0)