Provide more detail to the output of --help (#24) #63
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 ./... |