Skip to content

Commit 12effa1

Browse files
committed
ci: add EnricoMi/publish-unit-test-result-action
1 parent ea2692d commit 12effa1

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

.github/actions/test-package/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ runs:
2121
shell: bash
2222
run: |
2323
mkdir -p test-results
24-
npm run test | tee -a ./test-results/${{ inputs.package_name }}-test-results.txt
24+
npm run test
2525
- name: Store Test Results
2626
if: ${{ !cancelled() }}
2727
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4

.github/workflows/ci.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,34 @@ jobs:
8787
with:
8888
package_name: ${{ matrix.package }}
8989

90+
report:
91+
name: Test Report
92+
runs-on: ubuntu-latest
93+
needs: test
94+
if: ${{ !cancelled() }}
95+
permissions:
96+
checks: write
97+
pull-requests: write
98+
contents: read
99+
issues: read
100+
steps:
101+
- name: Download artifacts
102+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
103+
with:
104+
path: artifacts
105+
pattern: "*-test-output"
106+
- name: List downloaded artifacts
107+
run: ls -R ./artifacts/
108+
- name: Publish test reports
109+
uses: EnricoMi/publish-unit-test-result-action@v2
110+
with:
111+
files: "./artifacts/*/**/*"
112+
90113
results:
91114
name: Results
92115
runs-on: ubuntu-latest
93116
needs: test
94-
if: ${{ always() }}
117+
if: ${{ !cancelled() }}
95118
steps:
96119
- run: |
97120
case "${{ needs.test.result }}" in

0 commit comments

Comments
 (0)