-
Notifications
You must be signed in to change notification settings - Fork 1
99 lines (97 loc) · 2.62 KB
/
push.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
---
on: push
name: Build and test
permissions:
contents: write
jobs:
generated:
name: Check generated code is up to date
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: WillAbides/setup-go-faster@v1.14.0
with:
go-version-file: go.mod
- name: go mod tidy
run: |
go mod tidy
git diff --exit-code
- name: go generate
run: |
go generate -x
git diff --exit-code
build_and_test:
name: Build and test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: WillAbides/setup-go-faster@v1.14.0
with:
go-version-file: go.mod
- name: go version
run: go version
- name: go mod verify
run: go mod verify
- name: go vet
run: go vet ./...
- name: go fmt ./..
run: |
go fmt ./...
git diff --exit-code
- name: Test
uses: robherley/go-test-action@v0.5.0
with:
testArguments: -race -shuffle=on -benchtime=1x -cover -covermode=atomic -coverprofile=coverage.txt ./...
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Install changelog management tool
run: go install github.com/goreleaser/chglog/cmd/chglog@main
- name: Build changelog
run: chglog init
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: "~> v2"
args: release --snapshot
- uses: actions/upload-artifact@v4
with:
name: Debian packages
path: dist/*.deb
nilaway:
name: Nilaway
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: WillAbides/setup-go-faster@v1.14.0
with:
go-version-file: go.mod
- name: Install nilaway
run: go install go.uber.org/nilaway/cmd/nilaway@latest
- name: Run nilaway
run: nilaway ./...
license_check:
name: License check
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: WillAbides/setup-go-faster@v1.14.0
with:
go-version-file: go.mod
- name: Install wwhrd
run: go install github.com/frapposelli/wwhrd@latest
- name: go mod vendor
env:
GO111MODULE: 'on'
run: go mod vendor
- name: wwhrd check
run: wwhrd check