-
-
Notifications
You must be signed in to change notification settings - Fork 17
73 lines (56 loc) · 1.5 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
name: CI
# Because "push" also shows up on PRs, we don't need to do both.
on: [push]
jobs:
build-1_13:
name: Build (Go 1.13)
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '~1.13.5'
- name: Check out code
uses: actions/checkout@v2
with:
submodules: true
- name: Clean up extra files
run: rm ./_testcases/*.go
- name: Download deps
run: go mod download
- name: Run tests
run: go test -race -v ./...
build-latest:
name: Build (Latest)
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '~1.19'
- name: Check out code
uses: actions/checkout@v2
with:
submodules: true
- name: Clean up extra files
run: rm ./_testcases/*.go
- name: Download deps
run: go mod download
- name: Run tests
run: go test -covermode=atomic -coverprofile=profile.cov -race -v ./...
- name: Submit coverage report
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
GO111MODULE=off go get github.com/mattn/goveralls
$(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github
lint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: 'v1.49.0'