Browse Source

ci: use cheaper codecov data collection (#7009)

pull/7013/head
Sam Kleinman 3 years ago
committed by GitHub
parent
commit
6eaa3b24d6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      .github/workflows/coverage.yml
  2. +1
    -1
      test/test_cover.sh

+ 2
- 2
.github/workflows/coverage.yml View File

@ -89,7 +89,7 @@ jobs:
go-version: 1.16
- name: test & coverage report creation
run: |
cat pkgs.txt.part.${{ matrix.part }} | xargs go test -mod=readonly -timeout 8m -race -coverprofile=${{ matrix.part }}profile.out -covermode=atomic
cat pkgs.txt.part.${{ matrix.part }} | xargs go test -mod=readonly -timeout 8m -race -coverprofile=${{ matrix.part }}profile.out
if: env.GIT_DIFF
- uses: actions/upload-artifact@v2
with:
@ -125,7 +125,7 @@ jobs:
name: "${{ github.sha }}-03-coverage"
if: env.GIT_DIFF
- run: |
cat ./*profile.out | grep -v "mode: atomic" >> coverage.txt
cat ./*profile.out | grep -v "mode: set" >> coverage.txt
if: env.GIT_DIFF
- uses: codecov/codecov-action@v2.1.0
with:


+ 1
- 1
test/test_cover.sh View File

@ -6,7 +6,7 @@ set -e
echo "mode: atomic" > coverage.txt
for pkg in ${PKGS[@]}; do
go test -timeout 5m -race -coverprofile=profile.out -covermode=atomic "$pkg"
go test -timeout 5m -race -coverprofile=profile.out "$pkg"
if [ -f profile.out ]; then
tail -n +2 profile.out >> coverage.txt;
rm profile.out


Loading…
Cancel
Save