-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (47 loc) · 1.26 KB
/
all.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
name: CI
on:
push:
branches:
- main
tags:
- v*
pull_request:
env:
GOLANG_CI_VERSION: "1.41.1"
jobs:
lint:
runs-on: ubuntu-latest
continue-on-error: true #TODO: remove
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16.x
- name: Checkout code
uses: actions/checkout@v2
- name: Populate dependencies
run: go mod vendor
- name: Install golangci-lint
run: go install "github.com/golangci/golangci-lint/cmd/golangci-lint@v$GOLANG_CI_VERSION"
- name: Lint
run: golangci-lint run --out-format=tab ./...
test:
strategy:
matrix:
go-version: [ 1.15.x, 1.16.x ] # TODO: add tip
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix['go-version'] }}
- name: Checkout code
uses: actions/checkout@v2
- name: Test
run: GOMAXPROCS=2 go test -p 2 -race -timeout 120s -coverprofile=/tmp/code-coverage.out ./...
- name: Generate coverage report
run: go tool cover -html=/tmp/code-coverage.out -o /tmp/code-coverage.html
- uses: actions/upload-artifact@v1
with:
name: test coverage report
path: /tmp/code-coverage.html