| 1 |
name: Go |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- main |
| 7 |
pull_request: |
| 8 |
|
| 9 |
jobs: |
| 10 |
lint: |
| 11 |
name: Lint |
| 12 |
runs-on: ubuntu-latest |
| 13 |
steps: |
| 14 |
- uses: actions/checkout@v4 |
| 15 |
- uses: actions/setup-go@v5 |
| 16 |
with: |
| 17 |
go-version: "1.24" |
| 18 |
- name: fmt |
| 19 |
run: diff -u <(echo -n) <(gofmt -s -d .) |
| 20 |
- name: vet |
| 21 |
run: go vet ./... |
| 22 |
- name: staticcheck |
| 23 |
run: go run honnef.co/go/tools/cmd/staticcheck@latest ./... |
| 24 |
|
| 25 |
test: |
| 26 |
name: Test |
| 27 |
runs-on: ubuntu-latest |
| 28 |
steps: |
| 29 |
- uses: actions/checkout@v4 |
| 30 |
- uses: actions/setup-go@v5 |
| 31 |
with: |
| 32 |
go-version: "1.21" |
| 33 |
- name: test |
| 34 |
run: TZ="" go test ./... -race -tags=faketime |