aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Dietz <noahdietz@users.noreply.github.com>2023-08-18 10:05:16 -0700
committerGitHub <noreply@github.com>2023-08-18 10:05:16 -0700
commit97c970d2a5cea49ee54b4deb227597e37736c96e (patch)
tree0a1029bb3c060ebfd24e08d55e5a650f29ebf0fb
parent53f93a84e656111bf039a99113dccf451633e50a (diff)
downloadgoogle-uuid-97c970d2a5cea49ee54b4deb227597e37736c96e.tar.gz
chore(ci): add apidiff check for API compatibility (#123)
-rw-r--r--.github/workflows/apidiff.yaml24
1 files changed, 24 insertions, 0 deletions
diff --git a/.github/workflows/apidiff.yaml b/.github/workflows/apidiff.yaml
new file mode 100644
index 0000000..ca2e787
--- /dev/null
+++ b/.github/workflows/apidiff.yaml
@@ -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 ]