diff --git a/.github/workflows/api_diff_check.yml b/.github/workflows/api_diff_check.yml deleted file mode 100644 index 9feee254d5b..00000000000 --- a/.github/workflows/api_diff_check.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Go - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - - build: - name: API Diff Check - runs-on: ubuntu-latest - steps: - - - name: Set up Go 1.x - 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 - - - name: Get dependencies - run: | - go install golang.org/x/exp/cmd/gorelease - - - name: Check APIs - run: $(go env GOPATH)/bin/gorelease diff --git a/Makefile b/Makefile index 32e5858ed8b..ea5ef22cfd0 100644 --- a/Makefile +++ b/Makefile @@ -229,6 +229,21 @@ cachedep-modules-%: && go run . -p $(subst _,/,$(subst cachedep-modules-,,$@)) ${EACHMODULE_FLAGS} \ "go mod download" +api-diff-modules-%: + @# Command that uses the pattern to define the root path that the + @# module testing will start from. Strips off the "api-diff-modules-" and + @# replaces all "_" with "/". + @# + @# Requires golang.org/x/exp/cmd/gorelease to be available in the GOPATH. + @# + @# e.g. api-diff-modules-internal_protocoltest + cd ./internal/repotools/cmd/eachmodule \ + && go run . -p $(subst _,/,$(subst api-diff-modules-,,$@)) \ + -fail-fast=true \ + -c 1 \ + -skip="internal/repotools" \ + "$$(go env GOPATH)/bin/gorelease" + ############## # CI Testing # ##############