From 64cebb3691e0b96129eb5e771f910bfd8747d88d Mon Sep 17 00:00:00 2001 From: Oscar Date: Mon, 28 Nov 2016 17:06:50 -0800 Subject: [PATCH] ci(reporting): Fix Incorrect Test Coverage Report (#58) Since switching to the parallel build test coverage is not reported correctly. It's still enforced at 100% but the reported values to codeclimate are 17% --- ci/node0.sh | 5 ----- circle.yml | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ci/node0.sh b/ci/node0.sh index 6fc7b48c..1e422390 100755 --- a/ci/node0.sh +++ b/ci/node0.sh @@ -2,12 +2,7 @@ # # Runs testing tasks on first CircleCI node # -# Coverage related tasks are grouped together because they all depend on the output of -# `npm run cover`. echo "Running node $CIRCLE_NODE_INDEX" npm run cover # Report test coverage locally -npm run cover:check # Fail if coverage drops below 100% -npm run codeclimate # Run tests and send coverage to code climate -cp -R coverage/* $CIRCLE_TEST_REPORTS # Copy test coverage reports for CircleCI diff --git a/circle.yml b/circle.yml index c0d6257a..e79f805b 100644 --- a/circle.yml +++ b/circle.yml @@ -21,6 +21,9 @@ test: override: - ci/node$CIRCLE_NODE_INDEX.sh: parallel: true + - npm run cover:check # Fail if coverage drops below 100% + - npm run codeclimate # Run tests and send coverage to code climate + - cp -R coverage/* $CIRCLE_TEST_REPORTS # Copy test coverage reports for CircleCI - | # `canvas` package needs a different install depending on the node version in use. nvm use $NODE_012 && rm -rf node_modules/canvas && npm i