1cb3fc3d14
The release workflow gates a tag, which is the last possible moment: a commit that breaks the suite stays green on main until somebody decides to publish. Runs go vet and go test on pushes to main and on pull requests. push is scoped to main so a branch pushed as part of a pull request is not checked twice, and runs for the same ref cancel each other.
33 lines
709 B
YAML
33 lines
709 B
YAML
name: CI
|
|
|
|
# The release workflow gates a tag, which is late: a broken commit sits green
|
|
# until somebody decides to publish. This runs the same checks on the way in.
|
|
#
|
|
# push is scoped to main so that a branch pushed as part of a pull request is
|
|
# not checked twice.
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
# A rapid series of pushes only needs the last one checked.
|
|
concurrency:
|
|
group: ci-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: Vet
|
|
run: go vet ./...
|
|
|
|
- name: Test
|
|
run: go test ./...
|