Skip to content

Commit

Permalink
wip -- coverage report to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ransomw1c committed Jan 29, 2020
1 parent e915dc4 commit 2238a57
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,26 @@ jobs:
go mod download
# cafs tests are memory intensive: best to run them separately
gotestsum --junitfile /tmp/test-results/go-test-report.xml --format short-with-failures -- \
-race $(go list ./...|grep -v cafs)
-race -coverprofile=c_non_cafs.out $(go list ./...|grep -v cafs)
# cafs testing: trade parallelism for memory on limited CI config + race turned off
gotestsum --junitfile /tmp/test-results/go-test-report-cafs.xml --format short-with-failures -- -parallel 4 ./pkg/cafs/...
gotestsum --junitfile /tmp/test-results/go-test-report-cafs.xml --format short-with-failures -- \
-parallel 4 -coverprofile=c_cafs_only.out ./pkg/cafs/...
# collect coverage metrics
mkdir -p /tmp/test-coverage
go tool cover -html=c_non_cafs.out -o coverage_non_cafs.html
go tool cover -html=c_cafs_only.out -o coverage_cafs_only.html
mv coverage_non_cafs.html coverage_cafs_only.html \
/tmp/test-coverage
- save_cache:
key: pkg-cache-{{ checksum "go.sum" }}
paths:
- "/go/pkg"
- store_artifacts:
path: /tmp/test-results
destination: raw-test-output
- store_artifacts:
path: /tmp/test-coverage
destination: coverage-report
- store_test_results:
path: /tmp/test-results

Expand Down

0 comments on commit 2238a57

Please sign in to comment.