CI: refine codecov (#1064)

This commit is contained in:
Loyalsoldier
2021-06-13 10:13:29 +08:00
committed by GitHub
parent 4d768b575d
commit b275548a80
3 changed files with 11 additions and 75 deletions
-35
View File
@@ -1,35 +0,0 @@
name: Coverage
on:
push:
branches:
- master
- v*
paths:
- "**/*.go"
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.16.4
- name: Checkout codebase
uses: actions/checkout@v2
- name: Get dependencies
run: go get -v -t -d ./...
- name: Run coverage
run: |
chmod u+x ./testing/coverage/coverall.sh
./testing/coverage/coverall.sh
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.txt
fail_ci_if_error: true
+11 -1
View File
@@ -34,6 +34,16 @@ jobs:
- name: Checkout codebase
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Test
run: go test -v -timeout 1h ./...
run: |
export PATH=$(go env GOPATH)/bin:${PATH}
go install -v github.com/ory/go-acc@latest
go-acc --covermode=atomic -o=coverage.txt ./...
shell: bash
- name: Upload codecov
run: bash <(curl -s https://codecov.io/bash)
shell: bash