generate a coverage.txt file, and upload to codecov.io.

This commit is contained in:
Jason Kulatunga
2020-09-20 16:24:30 -06:00
parent 853b1a7249
commit a55f3acacf
2 changed files with 8 additions and 1 deletions
+6 -1
View File
@@ -23,7 +23,7 @@ jobs:
go mod vendor
go test -v -tags "static" $(go list ./... | grep -v /vendor/)
go test -race -coverprofile=coverage.txt -covermode=atomic -v -tags "static" $(go list ./... | grep -v /vendor/)
go build -ldflags "-X main.goos=linux -X main.goarch=amd64" -o scrutiny-web-linux-amd64 -tags "static" webapp/backend/cmd/scrutiny/scrutiny.go
go build -ldflags "-X main.goos=linux -X main.goarch=amd64" -o scrutiny-collector-metrics-linux-amd64 -tags "static" collector/cmd/collector-metrics/collector-metrics.go
@@ -37,6 +37,11 @@ jobs:
path: |
${{ env.PROJECT_PATH }}/scrutiny-web-linux-amd64
${{ env.PROJECT_PATH }}/scrutiny-collector-metrics-linux-amd64
- uses: codecov/codecov-action@v1
with:
file: coverage.txt
flags: unittests
fail_ci_if_error: true
build-docker:
name: Build Docker
runs-on: ubuntu-latest
+2
View File
@@ -62,3 +62,5 @@ vendor
/scrutiny-web-linux-amd64
scrutiny-*.db
scrutiny_test.db
coverage.txt