Skip to content

Commit

Permalink
build: don't fail coverage from untrusted forks
Browse files Browse the repository at this point in the history
The CircleCI tool by default will not expose secrets to untrusted
forks in the ci build. In this case, that means that
`$CODACY_PROJECT_TOKEN` is not set before the build, and the final
step of the CI build is to send Codacy coverage data. This change
prevents this from causing a build failure when the variable is
unset due to a PR from an untrusted fork (i.e. the community).
  • Loading branch information
lance committed Apr 30, 2019
1 parent 2d24b35 commit 194e18d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"test": "nyc tape test/*.js | tap-spec",
"test:headless": "node test/browser/webpack-test.js",
"test:browser": "opener http://localhost:9007/test/browser/index.html && serve . -p 9007",
"coverage": "nyc report && nyc report --reporter=text-lcov | codacy-coverage",
"coverage": "nyc report && if [ $CODACY_PROJECT_TOKEN'' != '' ] ; then nyc report --reporter=text-lcov | codacy-coverage; fi",
"ci": "npm run build && npm run test && npm run test:headless && npm run coverage",
"prerelease": "npm run test:ci",
"release": "standard-version -s",
Expand Down

0 comments on commit 194e18d

Please sign in to comment.