Create go-test.yml
This commit is contained in:
parent
d9dec16e27
commit
9ee368f10d
29
.github/workflows/go-test.yml
vendored
Normal file
29
.github/workflows/go-test.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
name: Build and Test
|
||||||
|
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.
|
||||||
|
run: go test -short -coverprofile cover.out -covermode=atomic ${PKG_LIST} && cat cover.out >> coverage.txt
|
||||||
|
|
||||||
|
- name: Upload Coverage report to CodeCov
|
||||||
|
uses: codecov/codecov-action@v1.0.0
|
||||||
|
with:
|
||||||
|
token: ${{secrets.CODECOV_TOKEN}}
|
||||||
|
file: ./coverage.txt
|
Loading…
Reference in New Issue
Block a user