Skip to content

Commit 44cb5f9

Browse files
committed
ci: feed node-tap output to test report generator
1 parent 12effa1 commit 44cb5f9

File tree

6 files changed

+14
-26
lines changed

6 files changed

+14
-26
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,19 @@ runs:
1919
- name: Test
2020
working-directory: ./packages/${{ inputs.package_name }}
2121
shell: bash
22+
env:
23+
TAP_REPORTER: "junit"
24+
TAP_REPORTER_FILE: "test-results/junit.xml"
2225
run: |
2326
mkdir -p test-results
2427
npm run test
28+
- name: Publish test reports
29+
if: ${{ !cancelled() }}
30+
uses: EnricoMi/publish-unit-test-result-action@v2
31+
with:
32+
files: "./packages/${{ inputs.package_name }}/test-results/**/*"
33+
check_name: "Test report for ${{ inputs.package_name }}"
34+
test_file_prefix: "+packages/${{ inputs.package_name }}/"
2535
- name: Store Test Results
2636
if: ${{ !cancelled() }}
2737
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4

.github/workflows/ci.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -87,29 +87,6 @@ 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-
11390
results:
11491
name: Results
11592
runs-on: ubuntu-latest

packages/scratch-gui/.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ npm-*
88
# Testing
99
/.nyc_output
1010
/coverage
11+
/test-results
1112

1213
# Build
1314
/build
@@ -26,6 +27,3 @@ npm-*
2627

2728
# for act
2829
.secrets
29-
30-
# Generated test results
31-
/test-results

packages/scratch-render/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ npm-*
99
/.nyc_output
1010
/.tap
1111
/coverage
12+
/test-results
1213

1314
# IDEA
1415
/.idea

packages/scratch-svg-renderer/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ npm-*
1111

1212
# Test
1313
/.tap
14+
/test-results
1415

1516
# Editors
1617
/#*

packages/scratch-vm/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ npm-*
99
/.nyc_output
1010
/.tap
1111
/coverage
12+
/test-results
1213

1314
# Editor
1415
/.idea

0 commit comments

Comments
 (0)