-
-
Notifications
You must be signed in to change notification settings - Fork 42
64 lines (50 loc) · 1.31 KB
/
build-test-lint.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
name: Continuous Integration
on: [push, pull_request]
jobs:
build:
name: Build, test and lint
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
id: go
- name: Install OS dependencies
run: sudo apt-get install libtagc0-dev upx-ucl
- name: Build
run: |
make release
- name: Unit Tests
run: |
go test ./...
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.58.1
- name: Build Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: false
cover:
name: Code Test Coverage
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Install OS dependencies
run: sudo apt-get install libtagc0-dev upx-ucl
- name: Generate cover profile
run: |
go test -race -covermode atomic -coverprofile=covprofile ./...
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: covprofile