Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): add apidiff check for API compatibility #123

Merged
merged 9 commits into from
Aug 18, 2023
24 changes: 24 additions & 0 deletions .github/workflows/apidiff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: apidiff
on:
pull_request:
branches:
- master
jobs:
compat:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: 1.21
- run: go install golang.org/x/exp/cmd/apidiff@latest
- uses: actions/checkout@v3
with:
ref: master
- run: apidiff -w uuid.baseline .
- uses: actions/checkout@v3
with:
clean: false
- run: |
apidiff -incompatible uuid.baseline . > diff.txt
cat diff.txt && ! [ -s diff.txt ]