From 191629d3fa68df8046a6adfba0f77e60a45e59c3 Mon Sep 17 00:00:00 2001 From: Joe Lanford Date: Mon, 22 Feb 2021 20:18:06 -0500 Subject: [PATCH] Add optional go-apidiff test to CI Signed-off-by: Joe Lanford --- .github/workflows/go.yaml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index b993be634..c4eee9f74 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -11,12 +11,29 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - name: Set up Go 1.15 - uses: actions/setup-go@v1.1.3 + - name: Set up Go + uses: actions/setup-go@v2 with: go-version: 1.15 id: go - name: Check out code into the Go module directory - uses: actions/checkout@v2.0.0 + uses: actions/checkout@v2 - name: unit-test run: go test -mod=vendor -v ./... + + go-apidiff: + name: go-apidiff + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.15 + id: go + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Run go-apidiff + uses: joelanford/go-apidiff@master