47 lines (36 loc) · 977 Bytes
/
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
name: Go
on: [push, pull_request]
env:
GO11MODULE: on
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2-beta
with:
go-version: '^1.7'
- name: Check out code
uses: actions/checkout@9a3a9ade
with:
submodules: true
- name: Clean up extra files
run: rm ./testcases/*.go
- name: Run golangci-lint
uses: actions-contrib/golangci-lint@v1
env:
GOROOT: ''
with:
golangci_lint_version: 'v1.23.6'
- name: Download deps
run: go mod download
- name: Run tests
run: go test -race -v ./...
- name: Submit coverage report
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
go test -covermode=count -coverprofile=profile.cov
GO111MODULE=off go get github.com/mattn/goveralls
$(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github