-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.07 KB
/
build.yml
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
name: Build
on: push
jobs:
build:
name: concurrenthash build
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
check-latest: true
cache: true
go-version: "1.22"
- name: Build & Test
run: |
go clean -r ./...
go mod tidy
go build -v -ldflags="-s -w" ./...
go test -v -race -count 1 -parallel 5 -covermode=atomic -coverprofile="coverage.out" ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true # optional (default = false)
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: latest
args: --timeout=5m
- name: Govulncheck
uses: kmulvey/govulncheck-action@v1.2.0