fix(fvt): ensure correct version in consumer tests #447
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: API Compatibility | |
on: | |
merge_group: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
apidiff: | |
runs-on: ubuntu-latest | |
if: github.base_ref | |
steps: | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21.x | |
- name: Add GOBIN to PATH | |
run: echo "$(go env GOPATH)/bin" >>$GITHUB_PATH | |
- name: Install apidiff cmd | |
run: go install golang.org/x/exp/cmd/apidiff@latest | |
- name: Checkout base code | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.base_ref }} | |
path: "base" | |
- name: Capture apidiff baseline | |
run: apidiff -m -w ../baseline.bin . | |
working-directory: "base" | |
- name: Checkout updated code | |
uses: actions/checkout@v3 | |
with: | |
path: "updated" | |
- name: Run apidiff check | |
run: apidiff -m -incompatible ../baseline.bin . | |
working-directory: "updated" |