From 206c1d52270a1c1bd43300d6d93ceeb07ee25cfa Mon Sep 17 00:00:00 2001 From: Mike Fiedler Date: Tue, 18 Feb 2020 22:42:36 -0500 Subject: [PATCH] test: store test result artifacts This is an initial implementation in trying to set up CircleCI Test Metadata. I've decided to start with ESLint, so as to have a basis for expanding reporting to other jUnit-style reports, like TAP. Refs: https://circleci.com/docs/2.0/collect-test-data/#eslint Signed-off-by: Mike Fiedler --- circle.yml | 6 +++++- package.json | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index ef3ec251..138b608f 100644 --- a/circle.yml +++ b/circle.yml @@ -39,10 +39,14 @@ jobs: # install deps - run: npm i # lint: - - run: npm run lint + - run: npm run ci:lint # test! - run: | export PATH="$HOME/.poetry/bin:$PATH" export LC_ALL=C.UTF-8 export LANG=C.UTF-8 npm run test + - store_test_results: + path: ~/reports + - store_artifacts: + path: ~/reports diff --git a/package.json b/package.json index aba8b96f..dc887bbd 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "main": "index.js", "bin": {}, "scripts": { + "ci:lint": "eslint *.js lib/*.js --format junit --output-file ~/reports/eslint.xml && prettier -c index.js lib/*.js", "test": "node test.js", "lint": "eslint *.js lib/*.js && prettier -l index.js lib/*.js || (echo need formatting ; exit 1)", "format": "prettier --write index.js lib/*.js test.js"