-
Notifications
You must be signed in to change notification settings - Fork 261
75 lines (72 loc) · 1.79 KB
/
ci.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
name: Continuous Integration
on:
workflow_dispatch:
pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]
paths-ignore:
- 'conf/**'
- 'docker/**'
- 'doc/**'
- 'k8s/**'
- 'scripts/**'
- '**.md'
- '.gitignore'
env:
GO111MODULE: on
GONOSUMDB: "*"
GOSUMDB: off
jobs:
CommitLint:
name: Commit Lint
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 100
- name: Run commitlint
uses: wagoid/commitlint-github-action@v5
GoLint:
name: "Code Analysis"
needs: CommitLint
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: WillAbides/[email protected]
with:
go-version: "1.21"
- name: Run go version check
run: make go-version-check
- name: Run go vet check
run: make go-vet-check
- name: Run golang-ci-lint
uses: golangci/[email protected]
with:
version: v1.53
args: --timeout=10m --tests=false
only-new-issues: true
skip-pkg-cache: true
skip-build-cache: true
BuildCheck:
name: "Go Build Check"
needs: GoLint
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: WillAbides/[email protected]
with:
go-version: "1.21"
- name: go mod tidy
run: make vendor
- name: go build linux
run: make build-linux && make build-linux-arm
- name: go build windows
run: make build-windows
- name: go build mac
run: make build-mac && make build-mac-arm