| 1 |
name: Run apidiff |
| 2 |
|
| 3 |
on: [ pull_request ] |
| 4 |
|
| 5 |
jobs: |
| 6 |
apidiff: |
| 7 |
runs-on: ubuntu-latest |
| 8 |
if: github.base_ref |
| 9 |
steps: |
| 10 |
- name: Install Go |
| 11 |
uses: actions/setup-go@v2 |
| 12 |
with: |
| 13 |
go-version: 1.16.x |
| 14 |
- name: Add GOBIN to PATH |
| 15 |
run: echo "PATH=$(go env GOPATH)/bin:$PATH" >>$GITHUB_ENV |
| 16 |
- name: Install dependencies |
| 17 |
run: GO111MODULE=off go get golang.org/x/exp/cmd/apidiff |
| 18 |
- name: Checkout old code |
| 19 |
uses: actions/checkout@v2 |
| 20 |
with: |
| 21 |
ref: ${{ github.base_ref }} |
| 22 |
path: "old" |
| 23 |
- name: Checkout new code |
| 24 |
uses: actions/checkout@v2 |
| 25 |
with: |
| 26 |
path: "new" |
| 27 |
- name: APIDiff |
| 28 |
run: ./_tools/apidiff.sh -d ../old |
| 29 |
working-directory: "new" |