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

add circleci config.yml with Jest test summary setting #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
45 changes: 45 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
version: 2
jobs:
build:
docker:
- image: circleci/node:latest
working_directory: ~/react-cafe-cms
steps:
- checkout
- run:
name: Install pcakage
command: yarn install
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- ~/react-cafe-cms

test:
docker:
- image: circleci/node:latest
working_directory: ~/react-cafe-cms
steps:
- checkout
- restore_cache:
keys:
# Find a cache corresponding to this specific yarn.lock checksum
# when this file is changed, this key will fail
- dependency-cache-{{ checksum "package.json" }}
- run:
name: Save Jest test results
command: yarn test --ci --testResultsProcessor="jest-junit"
environment:
JEST_JUNIT_OUTPUT: "reports/test-results/jest-junit.xml"
- store_test_results:
path: reports/test-results
- store_artifacts:
path: reports/test-results

workflows:
version: 2
build_and_test:
jobs:
- build
- test:
requires:
- build
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"enzyme-adapter-react-16": "^1.0.1",
"jest": "^21.2.1",
"jest-enzyme": "^4.0.0",
"jest-junit": "^3.1.0",
"nodemon": "^1.12.1",
"react": "^16.0.0",
"react-dom": "^16.0.0",
Expand Down