Skip to content

Switched from Mocha to Jest #250

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

Merged
merged 4 commits into from
Jan 16, 2019
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
21 changes: 13 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ version: 2.1
commands:
# Command based on instructions from CircleCI blog for avoiding fork secret leakage or failures
# https://circleci.com/blog/managing-secrets-when-you-have-pull-requests-from-outside-contributors/
coverage:
early-return-forks:
description: >-
Report coverage, and send to Coveralls if its not a fork.
If this build is from a fork, stop executing the current job and return success.
This is useful to avoid steps that will fail due to missing credentials.
steps:
- run:
name: Coverage
name: Early return if this build is from a forked PR
command: |
if [ -n "$CIRCLE_PR_NUMBER" ]; then
npm run coverage
else
npm run coverage | coveralls
echo "Nothing to do for forked PRs, so marking this step successful"
circleci step halt
fi

install-and-test:
Expand All @@ -33,8 +33,13 @@ commands:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- node_modules
- run: npm test
- coverage
- run:
name: Tests
command: npx jest --ci --coverage
- early-return-forks
- run:
name: Report Coverage
command: npx coveralls < coverage/lcov.info

jobs:
node-latest:
Expand Down
File renamed without changes.
File renamed without changes.
Loading