Merge pull request #18936 from ktalg/release-3.4 #15592
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: Tests | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- linux-amd64-fmt | |
- linux-amd64-integration-1-cpu | |
- linux-amd64-integration-2-cpu | |
- linux-amd64-integration-4-cpu | |
- linux-amd64-functional | |
- linux-amd64-unit-4-cpu-race | |
- all-build | |
- linux-amd64-grpcproxy | |
- linux-amd64-e2e | |
- linux-386-unit | |
steps: | |
- uses: actions/checkout@v2 | |
- id: goversion | |
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ steps.goversion.outputs.goversion }} | |
- run: date | |
- env: | |
TARGET: ${{ matrix.target }} | |
run: | | |
set -euo pipefail | |
go version | |
echo ${GOROOT} | |
echo "${TARGET}" | |
case "${TARGET}" in | |
linux-amd64-fmt) | |
GOARCH=amd64 PASSES='fmt bom dep' ./test | |
;; | |
linux-amd64-integration-1-cpu) | |
make install-gofail | |
GOARCH=amd64 CPU=1 RACE='false' FAILPOINTS='true' make test-integration | |
;; | |
linux-amd64-integration-2-cpu) | |
make install-gofail | |
GOARCH=amd64 CPU=2 RACE='false' FAILPOINTS='true' make test-integration | |
;; | |
linux-amd64-integration-4-cpu) | |
make install-gofail | |
GOARCH=amd64 CPU=4 RACE='false' FAILPOINTS='true' make test-integration | |
;; | |
linux-amd64-functional) | |
./build && GOARCH=amd64 PASSES='functional' ./test | |
;; | |
linux-amd64-unit-4-cpu-race) | |
GOARCH=amd64 RACE='true' CPU='4' GO_TEST_FLAGS='-p=2' make test-unit | |
;; | |
all-build) | |
GOARCH=amd64 PASSES='build' ./test | |
GOARCH=386 PASSES='build' ./test | |
GO_BUILD_FLAGS='-v' GOOS=darwin GOARCH=amd64 ./build | |
GO_BUILD_FLAGS='-v' GOOS=windows GOARCH=amd64 ./build | |
GO_BUILD_FLAGS='-v' GOARCH=arm ./build | |
GO_BUILD_FLAGS='-v' GOARCH=arm64 ./build | |
GO_BUILD_FLAGS='-v' GOARCH=ppc64le ./build | |
GO_BUILD_FLAGS='-v' GOARCH=s390x ./build | |
;; | |
linux-amd64-grpcproxy) | |
PASSES='build grpcproxy' CPU='4' RACE='true' ./test | |
;; | |
linux-amd64-e2e) | |
make install-gofail | |
GOARCH=amd64 FAILPOINTS='true' CPU='4' make test-e2e-release | |
;; | |
linux-386-unit) | |
GOARCH=386 make test-unit | |
;; | |
*) | |
echo "Failed to find target" | |
exit 1 | |
;; | |
esac |