-
Notifications
You must be signed in to change notification settings - Fork 89
43 lines (41 loc) · 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
name: Tests and Coverage
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
name: Check for linting issues
steps:
- uses: actions/checkout@v2
- name: Setup go
uses: actions/setup-go@v2
with:
go-version: 1.19.x
- name: Lint
run: |
go vet .
build:
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
go:
- 1.19.x
- 1.18.x
name: Test with Go v${{ matrix.go }}
steps:
- uses: actions/checkout@v2
- name: Setup go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Setup
run: |
go install github.com/mattn/goveralls@latest
- name: Test
run: |
go test -v -parallel=10 -covermode=count -coverprofile=coverage.out
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
goveralls -coverprofile=coverage.out -service=github