crdb: Add ExecuteCtx for configurable retry limits #260
Workflow file for this run
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: Go | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
# This job aggregates all matrix results and is used for a GitHub required status check. | |
test_results: | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
name: Test Results | |
needs: [build_and_test] | |
steps: | |
- run: | | |
result="${{ needs.build_and_test.result }}" | |
if [[ $result == "success" || $result == "skipped" ]]; then | |
exit 0 | |
else | |
exit 1 | |
fi | |
build_and_test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: | |
- "1.19" | |
- "1.20" | |
- "1.21" | |
- "1.22" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Go ${{ matrix.go }} | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Install dependencies | |
run: | | |
# The latest crlfmt requires go1.19. | |
go install github.com/cockroachdb/crlfmt@v0.1.0 | |
go install github.com/kisielk/errcheck@v1.7.0 | |
go install github.com/mdempsky/unconvert@latest | |
go install honnef.co/go/tools/cmd/staticcheck@2023.1.7 | |
go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@latest | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test -v ./... | |
- name: Race | |
run: go test -p 1 -v ./... | |
- name: gofmt | |
run: gofmt -s -d -l . | |
- name: vet | |
run: | | |
! go vet -vettool=$(which shadow) ./... 2>&1 | \ | |
grep -vF 'declaration of "err" shadows declaration at' | \ | |
grep -vF "# github.com/cockroachdb/cockroach-go/v2/testserver" | \ | |
grep -vF "# [github.com/cockroachdb/cockroach-go/v2/testserver_test]" | |
- name: License checks | |
run: | | |
! git grep -lE '^// Author' -- '*.go' | |
! git grep -LE '^// Copyright' -- '*.go' | |
- name: errchk | |
run: errcheck -ignore "Close|Init|AutoMigrate" ./... | |
- name: staticcheck | |
run: staticcheck ./... |