Set up coverage

This commit is contained in:
Alec Sears
2019-10-10 15:35:44 -05:00
parent a50c9a3e77
commit 49ecea2b90
3 changed files with 3 additions and 2 deletions

View File

@@ -103,6 +103,7 @@ jobs:
paths: paths:
- ./vendor - ./vendor
- run: make test-ci - run: make test-ci
- run: bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
- store_test_results: - store_test_results:
path: /tmp/circleci-test-results path: /tmp/circleci-test-results
- store_artifacts: - store_artifacts:

View File

@@ -31,7 +31,7 @@ test-backend:
go test -v -mod=vendor ./... go test -v -mod=vendor ./...
test-ci: test-ci:
npm run ci-test npm run ci-test
go test -race -coverprofile=coverage.txt -covermode=atomic -mod=vendor go test -race -coverprofile=tmp/coverage/golang/coverage.txt -covermode=atomic -mod=vendor
.PHONY: clean .PHONY: clean
clean: clean:

View File

@@ -22,7 +22,7 @@ module.exports = {
"^.+\\.js$": "babel-jest", "^.+\\.js$": "babel-jest",
"^.+\\.(ts|tsx)$": "ts-jest" "^.+\\.(ts|tsx)$": "ts-jest"
}, },
"coverageDirectory": "<rootDir>/tmp/coverage/", "coverageDirectory": "<rootDir>/tmp/coverage/node/",
"collectCoverage": false, "collectCoverage": false,
"globals": { "globals": {
"ts-jest": { "ts-jest": {