Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10514 fix coverage - 3 #12

Merged
merged 4 commits into from
Sep 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,12 @@ jobs:
command: make test-resources
- run:
name: test
command: ./node_modules/.bin/jest --testResultsProcessor="jest-junit-reporter" --coverage
environment:
TEST_REPORT_PATH: ./reports
command: make test-ci
- store_test_results:
path: ./reports
- run:
name: code-coverage
command: ./packages/uxpin-code-cli/node_modules/.bin/codecov -F unittests uxpin-code-cli
command: ./packages/uxpin-code-cli/node_modules/.bin/codecov -F unittests -F uxpin_code_cli
working_directory: ~/project/

workflows:
Expand All @@ -54,4 +52,4 @@ workflows:
- build
- uxpin-code-cli:
requires:
- build
- build
1 change: 1 addition & 0 deletions packages/uxpin-code-cli/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
/src/**/*.js
/src/**/*.js.map
/test/resources/repos/
/reports/
9 changes: 8 additions & 1 deletion packages/uxpin-code-cli/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH := $(shell yarn bin):$(PATH)
SHELL := /bin/bash -o pipefail

.PHONY: build check test clean test-resources
.PHONY: build check test test-ci clean test-remap-coverage test-resources

build:
tsc
Expand All @@ -13,6 +13,10 @@ test:
make test-resources
jest

test-ci:
TEST_REPORT_PATH=./reports jest --config="jest-ci.json"
make test-remap-coverage

clean:
rm -rf ./dist/
find ./src -name "*.js" -delete
Expand All @@ -26,6 +30,9 @@ clean:
rm -rf ./.nyc_output
rm -rf ./test/resources/repos/*

test-remap-coverage:
remap-istanbul -i coverage/coverage-final.json -o coverage/clover.xml -t clover

test-resources: test/resources/repos/nordnet-ui-kit test/resources/repos/arui-feather test/resources/repos/polaris

test/resources/repos/nordnet-ui-kit:
Expand Down
14 changes: 14 additions & 0 deletions packages/uxpin-code-cli/jest-ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"collectCoverage": true,
"collectCoverageFrom": [
"src/**/*.js"
],
"coverageReporters": [
"json"
],
"testMatch": [
"**/test/**/*.test.js"
],
"testEnvironment": "node",
"testResultsProcessor": "jest-junit-reporter"
}
8 changes: 1 addition & 7 deletions packages/uxpin-code-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@
"UI components"
],
"jest": {
"coverageReporters": [
"lcov"
],
"collectCoverageFrom": [
"src/**/*.ts",
"!src/**/*.d.ts"
],
"moduleFileExtensions": [
"ts",
"js"
Expand All @@ -45,6 +38,7 @@
"jest-junit-reporter": "^1.1.0",
"nordnet-ui-kit": "https://github.com/nordnet/nordnet-ui-kit.git",
"nyc": "^11.2.1",
"remap-istanbul": "^0.9.5",
"ts-jest": "^21.0.0",
"tslint": "^5.7.0",
"tslint-config-uxpin": "latest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ function getNycOptions():string {
const coverageDir:string = getCoverageOutputDirPath();
return `--cwd="${packageRootDir}" \
--report-dir="${coverageDir}" \
--reporter=lcov \
--reporter=clover \
--extension=".ts"`;
}
Loading