Skip to content

Commit

Permalink
Tweak CI
Browse files Browse the repository at this point in the history
Based on input from golang/go#42119
  • Loading branch information
arnested committed Jun 13, 2024
1 parent 602950e commit 964c402
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Build and test
permissions:
contents: write
jobs:
go_generate:
generated:
name: Check generated code is up to date
runs-on: ubuntu-22.04
steps:
Expand All @@ -13,13 +13,14 @@ jobs:
uses: WillAbides/[email protected]
with:
go-version-file: go.mod
- name: go mod tidy
run: |
go mod tidy
git diff --exit-code
- name: go generate
env:
GO111MODULE: 'on'
GOPATH: ${{ github.workspace }}/go
run: go generate -x
- name: Diff after go generate
run: git diff --exit-code
run: |
go generate -x
git diff --exit-code
build_and_test:
name: Build and test
runs-on: ubuntu-22.04
Expand All @@ -32,13 +33,19 @@ jobs:
with:
go-version-file: go.mod
- name: go version
env:
GO111MODULE: 'on'
run: go version
- name: go mod verify
run: go mod verify
- name: go vet
run: go vet ./...
- name: go fmt ./..
run: |
go fmt ./...
git diff --exit-code
- name: Test
uses: robherley/[email protected]
with:
testArguments: -race -cover -covermode=atomic -coverprofile=coverage.txt ./...
testArguments: -race -shuffle=on -benchtime=1x -cover -covermode=atomic -coverprofile=coverage.txt ./...
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
- name: Install changelog management tool
Expand Down

0 comments on commit 964c402

Please sign in to comment.