|
|
|
@ -21,5 +21,46 @@ jobs:
|
|
|
|
|
- name: Build
|
|
|
|
|
run: go build -v ./...
|
|
|
|
|
|
|
|
|
|
test:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
|
|
- name: Set up Go
|
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
|
with:
|
|
|
|
|
go-version: 1.16
|
|
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
|
run: go build -v ./...
|
|
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
|
run: go test -v ./...
|
|
|
|
|
|
|
|
|
|
coverage:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
|
|
- name: Set up Go
|
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
|
with:
|
|
|
|
|
go-version: 1.16
|
|
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
|
run: go build -v ./...
|
|
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
|
run: go test -v ./...
|
|
|
|
|
|
|
|
|
|
- name: Generate coverage report
|
|
|
|
|
run: |
|
|
|
|
|
go test `go list ./... | grep -v examples` -coverprofile=coverage.txt -covermode=atomic
|
|
|
|
|
|
|
|
|
|
- name: Upload coverage report
|
|
|
|
|
uses: codecov/codecov-action@v1.0.2
|
|
|
|
|
with:
|
|
|
|
|
token: 50ed170f-08b5-4484-97d8-37771615ae42
|
|
|
|
|
file: ./coverage.txt
|
|
|
|
|
flags: unittests
|
|
|
|
|
name: codecov-umbrella
|