-
Notifications
You must be signed in to change notification settings - Fork 16
50 lines (43 loc) · 1.1 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
---
name: "CI"
on:
push:
paths:
- '.github/workflows/*'
- 'controllers/*'
- 'vendor/*'
- 'go.mod'
- 'go.sum'
- 'main.go'
jobs:
build:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/[email protected]
with:
go-version: '1.21.1'
- name: Checkout code
uses: actions/[email protected]
- name: Run go fmt
run: make fmt
- name: Run go vet
run: make vet
- name: Run go lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54.2
args: --timeout 5m --enable revive,gofmt,exportloopref --exclude-use-default=false --modules-download-mode=vendor --build-tags integration
- name: Run go test
run: make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: GO
fail_ci_if_error: true
files: ./cover.out
flags: unittests
name: codecov-umbrella
verbose: true