Skip to content

Commit

Permalink
Publish test results (#363)
Browse files Browse the repository at this point in the history
* Publish test results

* Update test.yml

* Update test.yml

* Update test.yml

* Update test.yml
  • Loading branch information
varunsh-coder committed Dec 7, 2023
1 parent c0db65e commit ea8b747
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/test.yml
Expand Up @@ -13,6 +13,9 @@ concurrency:
group: ${{ github.workflow }}
jobs:
test:
permissions:
checks: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Harden Runner
Expand All @@ -35,3 +38,9 @@ jobs:
- name: Run coverage
run: npm test -- --coverage
- 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 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -20,6 +20,7 @@ lib-cov

# Coverage directory used by tools like istanbul
coverage
reports
*.lcov

# nyc test coverage
Expand Down
8 changes: 6 additions & 2 deletions jest.config.ts
@@ -1,5 +1,9 @@
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
export default {
preset: 'ts-jest',
testEnvironment: 'node',
preset: "ts-jest",
testEnvironment: "node",
reporters: [
"default",
["jest-junit", { outputDirectory: "reports", outputName: "report.xml" }],
],
};

0 comments on commit ea8b747

Please sign in to comment.