From 49e56aebd78c3cb3c504094113bba2681fb34e3b Mon Sep 17 00:00:00 2001 From: Jeff Avallone Date: Tue, 29 May 2018 17:30:51 -0400 Subject: [PATCH] Setting up CircleCI test summary support --- .circleci/config.yml | 5 ++++- .gitignore | 4 ++-- package.json | 10 ++++++++-- yarn.lock | 12 ++++++++++++ 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index da0d0f1..927f7f6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,7 +28,10 @@ jobs: command: yarn test - store_artifacts: - path: coverage + path: reports + + - store_test_results: + path: reports/junit.xml - run: name: Build site diff --git a/.gitignore b/.gitignore index 421543a..a0f4bcb 100644 --- a/.gitignore +++ b/.gitignore @@ -22,8 +22,8 @@ node_modules/ build/ script/__build__/ -# Coverage reports -coverage/ +# Testing reports +reports/ # Favicon cache .wwp-cache/ diff --git a/package.json b/package.json index 304eae0..5f24c3e 100644 --- a/package.json +++ b/package.json @@ -73,11 +73,16 @@ "!src/pages/**/config.js", "!src/pages/**/browser.js" ], - "coverageDirectory": "/coverage", + "coverageDirectory": "/reports/coverage", "coverageReporters": [ "text-summary", "html" - ] + ], + "testResultsProcessor": "jest-junit" + }, + "jest-junit": { + "output": "./reports/junit.xml", + "suiteName": "Jest tests" }, "eslintConfig": { "env": { @@ -151,6 +156,7 @@ "identity-obj-proxy": "^3.0.0", "immutable": "^3.8.2", "jest": "^22.2.2", + "jest-junit": "^4.0.0", "mime-types": "^2.1.18", "npm-run-all": "^4.1.2", "postcss-cssnext": "^3.1.0", diff --git a/yarn.lock b/yarn.lock index 2667ad6..cab2261 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5129,6 +5129,14 @@ jest-jasmine2@^22.4.3: jest-util "^22.4.3" source-map-support "^0.5.0" +jest-junit@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-4.0.0.tgz#6af04d43940d7e81dc7d37ec1b80c97551d91e80" + dependencies: + mkdirp "^0.5.1" + strip-ansi "^4.0.0" + xml "^1.0.1" + jest-leak-detector@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-22.4.3.tgz#2b7b263103afae8c52b6b91241a2de40117e5b35" @@ -9967,6 +9975,10 @@ xml2js@^0.4.5: sax ">=0.6.0" xmlbuilder "~9.0.1" +xml@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" + xmlbuilder@^4.1.0: version "4.2.1" resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-4.2.1.tgz#aa58a3041a066f90eaa16c2f5389ff19f3f461a5"