-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (43 loc) · 1.22 KB
/
ci.yml
File metadata and controls
50 lines (43 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# When a new revision is pushed to a PR, cancel all in-progress CI runs for that
# PR. See https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
GOPRIVATE: "github.com/StevenACoffman"
GOFLAGS: "-trimpath"
GOLANGCI_LINT_VERSION: latest
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-go@v6
with:
go-version: 'stable'
check-latest: true
cache-dependency-path: "**/*.sum"
- name: Build
run: go build ./...
- name: Vet
run: go vet ./...
- name: Test
run: go test -race ./...
- name: Lint
uses: golangci/golangci-lint-action@v9.2.0
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
args: --timeout 5m --issues-exit-code=0
verify: false
- name: Check go.mod and go.sum are tidy
run: |
go mod tidy
git diff --exit-code go.mod go.sum