Publish test results (#363)
* Publish test results * Update test.yml * Update test.yml * Update test.yml * Update test.yml
This commit is contained in:
parent
c0db65e1f6
commit
ea8b747819
3 changed files with 16 additions and 2 deletions
9
.github/workflows/test.yml
vendored
9
.github/workflows/test.yml
vendored
|
|
@ -13,6 +13,9 @@ concurrency:
|
||||||
group: ${{ github.workflow }}
|
group: ${{ github.workflow }}
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
permissions:
|
||||||
|
checks: write
|
||||||
|
pull-requests: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
|
|
@ -35,3 +38,9 @@ jobs:
|
||||||
- name: Run coverage
|
- name: Run coverage
|
||||||
run: npm test -- --coverage
|
run: npm test -- --coverage
|
||||||
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
|
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
|
||||||
|
- name: Publish Test Results
|
||||||
|
uses: step-security/publish-unit-test-result-action@v1
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
reports/*.xml
|
||||||
|
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -20,6 +20,7 @@ lib-cov
|
||||||
|
|
||||||
# Coverage directory used by tools like istanbul
|
# Coverage directory used by tools like istanbul
|
||||||
coverage
|
coverage
|
||||||
|
reports
|
||||||
*.lcov
|
*.lcov
|
||||||
|
|
||||||
# nyc test coverage
|
# nyc test coverage
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
|
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
|
||||||
export default {
|
export default {
|
||||||
preset: 'ts-jest',
|
preset: "ts-jest",
|
||||||
testEnvironment: 'node',
|
testEnvironment: "node",
|
||||||
|
reporters: [
|
||||||
|
"default",
|
||||||
|
["jest-junit", { outputDirectory: "reports", outputName: "report.xml" }],
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue