-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (37 loc) · 1.22 KB
/
tests.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
name: Tests
on: [push, pull_request]
jobs:
test:
name: Go ${{ matrix.go }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: ["1.16.x", "1.17.x"]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Create the coverage directory
run: mkdir ./coverage
- name: Run tests with Go ${{ matrix.go }} on ${{ matrix.os }}
run: go test -covermode atomic -coverprofile=./coverage/profile.cov ./geo
- run: go install github.com/jandelgado/gcov2lcov@latest
- name: Use gcov2lcov
run: gcov2lcov -infile=./coverage/profile.cov -outfile=./coverage/lcov.info
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-${{ matrix.os }}-go-${{ matrix.go }}
parallel: true
finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true