Bump the go_modules group across 1 directory with 2 updates #69
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: "Build and test" | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
workflow_dispatch: | |
merge_group: | |
push: | |
branches: | |
- 'main' | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
GOPROXY: https://proxy.golang.org/,direct | |
GOPRIVATE: "" | |
GONOPROXY: "" | |
GONOSUMDB: github.com/github/* | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ">=1.22" | |
check-latest: true | |
- name: Verify go.sum is up to date | |
run: | | |
go mod tidy | |
git diff --exit-code go.sum | |
if [ $? -ne 0 ]; then | |
echo "Error: go.sum has changed, please run `go mod tidy` and commit the result" | |
exit 1 | |
fi | |
- name: Build program | |
run: go build -v ./... | |
- name: Run tests | |
run: | | |
go version | |
go test -race -cover ./... |