Skip to content

Commit

Permalink
add jest report to workfow
Browse files Browse the repository at this point in the history
  • Loading branch information
kormanowsky committed Oct 3, 2024
1 parent 8412562 commit 0e10a18
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: main
name: Main Workflow
on:
push:
branches:
Expand All @@ -21,3 +21,11 @@ jobs:

- name: Run Unit Tests
run: npx jest

- name: Create Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Jest Tests
path: reports/jest-*.xml
reporter: jest-junit
12 changes: 10 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/** @type {import('ts-jest').JestConfigWithTsJest} **/
module.exports = {
preset: 'ts-jest'
}
testEnvironment: "node",
transform: {
"^.+.tsx?$": ["ts-jest",{}],
},
reporters: [
'default',
['jest-junit', {outputDirectory: 'reports', outputName: 'jest-junit.xml'}]
],
};

0 comments on commit 0e10a18

Please sign in to comment.