Skip to content

Commit

Permalink
feat: add junit testing report on comment
Browse files Browse the repository at this point in the history
  • Loading branch information
pierobassa committed Oct 30, 2023
1 parent 942a479 commit 6c980bf
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/on-branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches:
- '**'
- '!main*'
pull_request:
branches:
- main

jobs:
install-build:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/unit-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ jobs:
hide-summary: false
coverage-title: Coverage
coverage-summary-path: coverage/coverage-summary.json
multiple-junitxml-files: |
core, packages/core/junit.xml
network, packages/network/junit.xml
errors, packages/errors/junit.xml
- name: Archive coverage
uses: actions/upload-artifact@v3
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ apps/**/.turbo
apps/**/node_modules

yarn-error.log
# Code coverage folder for tests
# Code coverage folders and files
coverage*
junit.xml

**/.DS_Store

# Turborepo
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"husky": "^8.0.3",
"jest": "^29.7.0",
"jest-docblock": "^24",
"jest-junit": "^16.0.0",
"jest-runner": "^29.7.0",
"jest-runner-groups": "^2.2.0",
"nyc": "^15.1.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/core/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
coverageReporters: ['html', 'lcov', 'json'],
runner: 'groups'
runner: 'groups',
reporters: ['jest-junit']
};
3 changes: 2 additions & 1 deletion packages/errors/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
coverageReporters: ['html', 'lcov', 'json']
coverageReporters: ['html', 'lcov', 'json'],
reporters: ['jest-junit']
};
3 changes: 2 additions & 1 deletion packages/network/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
coverageReporters: ['html', 'lcov', 'json'],
runner: 'groups'
runner: 'groups',
reporters: ['jest-junit']
};
15 changes: 15 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3776,6 +3776,16 @@ jest-haste-map@^29.7.0:
optionalDependencies:
fsevents "^2.3.2"

jest-junit@^16.0.0:
version "16.0.0"
resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-16.0.0.tgz#d838e8c561cf9fdd7eb54f63020777eee4136785"
integrity sha512-A94mmw6NfJab4Fg/BlvVOUXzXgF0XIH6EmTgJ5NDPp4xoKq0Kr7sErb+4Xs9nZvu58pJojz5RFGpqnZYJTrRfQ==
dependencies:
mkdirp "^1.0.4"
strip-ansi "^6.0.1"
uuid "^8.3.2"
xml "^1.0.1"

jest-leak-detector@^29.7.0:
version "29.7.0"
resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728"
Expand Down Expand Up @@ -6116,6 +6126,11 @@ [email protected]:
resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f"
integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==

xml@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5"
integrity sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==

[email protected]:
version "1.8.0"
resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc"
Expand Down

1 comment on commit 6c980bf

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Coverage

Summary

Lines Statements Branches Functions
Coverage: 99%
99.52% (836/840) 98.29% (231/235) 100% (155/155)
Title Tests Skipped Failures Errors Time
core 216 0 💤 0 ❌ 0 🔥 50.021s ⏱️
network 11 0 💤 0 ❌ 0 🔥 3.901s ⏱️
errors 25 0 💤 0 ❌ 0 🔥 11.57s ⏱️

Please sign in to comment.