Skip to content

Commit

Permalink
Merge pull request #506 from Medable/reporting
Browse files Browse the repository at this point in the history
add html report
  • Loading branch information
alahawash authored Mar 25, 2024
2 parents 3f3cff9 + 7a4bcd6 commit 14741d9
Show file tree
Hide file tree
Showing 5 changed files with 200 additions and 10 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/axon-tools-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,13 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Set ENV variables
id: vars
run: |
echo "CI_COMMIT_SHORT_SHA=$(git rev-parse --short ${{ github.sha }})" >> "$GITHUB_ENV"
- run: npm ci
- run: npm run test --workspace=@medable/mdctl-axon-tools
- uses: actions/upload-artifact@v4
with:
name: mdctl-axon-tools-report-${{ matrix.node-version }}
path: ./packages/mdctl-axon-tools/reports
175 changes: 171 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/mdctl-axon-tools/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,4 @@ output*/

manifest.json
.editorconfig
reports/
16 changes: 16 additions & 0 deletions packages/mdctl-axon-tools/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,20 @@ module.exports = {

// Automatically restore mock state and implementation before every test
restoreMocks: true,

// Custom reporters
reporters: ['default',
['jest-html-reporters', {
publicPath: './reports',
filename: 'report.html',
stripSkippedTest: true,
customInfos: [{
title: 'Ref',
value: process.env.GITHUB_HEAD_REF
}, {
title: 'Commit #',
value: process.env.CI_COMMIT_SHORT_SHA
}]
}]]

}
10 changes: 4 additions & 6 deletions packages/mdctl-axon-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@
"author": "Medable, Inc. <[email protected]>",
"license": "MIT",
"scripts": {
"test": "jest",
"test": "npm run lint && npm run cover",
"test:prod": "npm run test",
"test:only": "mocha --recursive",
"test:only": "jest",
"test:watch": "npm run test:only -- --watch",
"test:examples": "node examples/",
"cover": "istanbul cover ../../node_modules/mocha/bin/_mocha -- --recursive --timeout 10000",
"cover": "jest --coverage",
"lint": "eslint *.js"
},
"dependencies": {
Expand All @@ -46,9 +45,8 @@
"eslint-plugin-node": "^8.0.0",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"istanbul": "^1.0.0-alpha",
"jest": "^27.4.5",
"mocha": "^5.0.0",
"jest-html-reporters": "^3.1.7",
"nock": "^10.0.6"
},
"gitHead": "4d50c0a1a7e84d29ac2490436643434205ce3f6d"
Expand Down

0 comments on commit 14741d9

Please sign in to comment.