Merge pull request #124 from Crypho/github-ci

Setup GitHub actions to run tests
This commit is contained in:
remicorniere 2019-11-29 15:18:01 +00:00 committed by GitHub
commit 10078e2a1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

38
.github/workflows/test.yaml vendored Normal file
View file

@ -0,0 +1,38 @@
name: Run tests
on:
pull_request:
paths:
- '**.go'
- 'go.*'
- .github/workflows/test.yaml
push:
paths:
- '**.go'
- 'go.*'
- .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
run: |
go test ./... -v -race -coverprofile cover.out -covermode=atomic
- name: Convert coverage to lcov
uses: jandelgado/gcov2lcov-action@v1.0.0
with:
infile: cover.out
outfile: coverage.lcov
- name: Coveralls
uses: coverallsapp/github-action@v1.0.1
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov