2019-11-05 05:03:56 -08:00
|
|
|
name: Run tests
|
|
|
|
|
2019-11-28 00:51:49 -08:00
|
|
|
on:
|
2019-11-05 05:03:56 -08:00
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- '**.go'
|
2019-11-28 00:51:49 -08:00
|
|
|
- 'go.*'
|
2019-11-05 05:03:56 -08:00
|
|
|
- .github/workflows/test.yaml
|
|
|
|
|
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- '**.go'
|
2019-11-28 00:51:49 -08:00
|
|
|
- 'go.*'
|
2019-11-05 05:03:56 -08:00
|
|
|
- .github/workflows/test.yaml
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Set up Go 1.13
|
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
|
|
|
go-version: 1.13
|
|
|
|
id: go
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Run tests
|
2019-11-29 06:56:27 -08:00
|
|
|
run: |
|
|
|
|
go test ./... -v -race -coverprofile cover.out -covermode=atomic
|
|
|
|
- name: Convert coverage to lcov
|
2024-05-16 08:41:31 -07:00
|
|
|
uses: jandelgado/gcov2lcov-action@v1
|
2019-11-29 06:56:27 -08:00
|
|
|
with:
|
|
|
|
infile: cover.out
|
|
|
|
outfile: coverage.lcov
|
|
|
|
- name: Coveralls
|
2024-05-16 08:41:31 -07:00
|
|
|
uses: coverallsapp/github-action@v1
|
2019-11-29 06:56:27 -08:00
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.github_token }}
|
|
|
|
path-to-lcov: coverage.lcov
|