Skip to content

Commit

Permalink
Publish a Test report
Browse files Browse the repository at this point in the history
  • Loading branch information
jmigueprieto committed Nov 13, 2024
1 parent b8307a3 commit 1c701aa
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 3 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
run: yarn install
- name: Run the linter
run: yarn lint

unit-tests:
runs-on: ubuntu-latest
steps:
Expand All @@ -27,9 +28,16 @@ jobs:
node-version: "18"
- name: Install package
run: yarn install
- name: Run Unit test
run: yarn test
- name: Run Tests
run: yarn test --ci --reporters=default --reporters=jest-junit
env:
KEY_ID: ${{ secrets.KEY_ID }}
KEY_SECRET: ${{ secrets.KEY_SECRET }}
SERVER_URL: ${{ secrets.SERVER_URL }}
- name: Publish Test Results
if: always()
uses: dorny/test-reporter@v1
with:
name: Test report
path: reports/jest-*.xml
reporter: jest-junit
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"dotenv": "^16.0.1",
"eslint": "^6.1.0",
"jest": "^29.4.3",
"jest-junit": "^16.0.0",
"ts-jest": "^29.0.5",
"ts-node": "^10.7.0",
"tsup": "^7.1.0",
Expand All @@ -83,6 +84,14 @@
"engines": {
"node": ">=18"
},
"dependencies": {
"dependencies": {},
"jest-junit": {
"outputDirectory": "reports",
"outputName": "jest-junit.xml",
"ancestorSeparator": "",
"uniqueOutputName": "false",
"suiteNameTemplate": "{filepath}",
"classNameTemplate": "{classname}",
"titleTemplate": "{title}"
}
}
25 changes: 25 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2413,6 +2413,16 @@ jest-haste-map@^29.5.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.5.0:
version "29.5.0"
resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.5.0.tgz#cf4bdea9615c72bac4a3a7ba7e7930f9c0610c8c"
Expand Down Expand Up @@ -2823,6 +2833,11 @@ mkdirp@^0.5.1:
dependencies:
minimist "^1.2.6"

mkdirp@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==

[email protected]:
version "2.1.2"
resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
Expand Down Expand Up @@ -3578,6 +3593,11 @@ uri-js@^4.2.2:
dependencies:
punycode "^2.1.0"

uuid@^8.3.2:
version "8.3.2"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==

uuid@^9.0.0:
version "9.0.0"
resolved "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz"
Expand Down Expand Up @@ -3686,6 +3706,11 @@ [email protected]:
dependencies:
mkdirp "^0.5.1"

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==

y18n@^5.0.5:
version "5.0.8"
resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz"
Expand Down

0 comments on commit 1c701aa

Please sign in to comment.