Skip to content

Commit 206c1d5

Browse files
committed
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 <[email protected]>
1 parent 296416c commit 206c1d5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

circle.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,14 @@ jobs:
3939
# install deps
4040
- run: npm i
4141
# lint:
42-
- run: npm run lint
42+
- run: npm run ci:lint
4343
# test!
4444
- run: |
4545
export PATH="$HOME/.poetry/bin:$PATH"
4646
export LC_ALL=C.UTF-8
4747
export LANG=C.UTF-8
4848
npm run test
49+
- store_test_results:
50+
path: ~/reports
51+
- store_artifacts:
52+
path: ~/reports

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"main": "index.js",
3939
"bin": {},
4040
"scripts": {
41+
"ci:lint": "eslint *.js lib/*.js --format junit --output-file ~/reports/eslint.xml && prettier -c index.js lib/*.js",
4142
"test": "node test.js",
4243
"lint": "eslint *.js lib/*.js && prettier -l index.js lib/*.js || (echo need formatting ; exit 1)",
4344
"format": "prettier --write index.js lib/*.js test.js"

0 commit comments

Comments
 (0)