2020-07-31 12:36:18 +00:00
|
|
|
name: test
|
2020-07-31 12:31:32 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- v*
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
|
|
|
go-version: 1.14
|
|
|
|
|
|
|
|
- name: Check out code
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- name: Run Unit tests.
|
2020-07-31 12:36:18 +00:00
|
|
|
run: go test -coverprofile cover.out -covermode=atomic ${PKG_LIST} && cat cover.out >> coverage.txt
|
2020-07-31 12:31:32 +00:00
|
|
|
|
|
|
|
- name: Upload Coverage report to CodeCov
|
|
|
|
uses: codecov/codecov-action@v1.0.0
|
|
|
|
with:
|
|
|
|
token: ${{secrets.CODECOV_TOKEN}}
|
|
|
|
file: ./coverage.txt
|