diff --git a/.github/actions/test-package/action.yml b/.github/actions/test-package/action.yml index d0541d7e62..8be7c21d27 100644 --- a/.github/actions/test-package/action.yml +++ b/.github/actions/test-package/action.yml @@ -19,9 +19,19 @@ runs: - name: Test working-directory: ./packages/${{ inputs.package_name }} shell: bash + env: + TAP_REPORTER: "junit" + TAP_REPORTER_FILE: "test-results/junit.xml" run: | mkdir -p test-results - npm run test | tee -a ./test-results/${{ inputs.package_name }}-test-results.txt + npm run test + - name: Publish test reports + if: ${{ !cancelled() }} + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + files: "./packages/${{ inputs.package_name }}/test-results/**/*" + check_name: "Test report for ${{ inputs.package_name }}" + test_file_prefix: "+packages/${{ inputs.package_name }}/" - name: Store Test Results if: ${{ !cancelled() }} uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41e2950720..0f2c846b71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,7 +91,7 @@ jobs: name: Results runs-on: ubuntu-latest needs: test - if: ${{ always() }} + if: ${{ !cancelled() }} steps: - run: | case "${{ needs.test.result }}" in diff --git a/packages/scratch-gui/.gitignore b/packages/scratch-gui/.gitignore index c851a6e0cf..c8164bfc32 100644 --- a/packages/scratch-gui/.gitignore +++ b/packages/scratch-gui/.gitignore @@ -8,6 +8,7 @@ npm-* # Testing /.nyc_output /coverage +/test-results # Build /build @@ -26,6 +27,3 @@ npm-* # for act .secrets - -# Generated test results -/test-results diff --git a/packages/scratch-render/.gitignore b/packages/scratch-render/.gitignore index bb895a642a..d0ebddd55e 100644 --- a/packages/scratch-render/.gitignore +++ b/packages/scratch-render/.gitignore @@ -9,6 +9,7 @@ npm-* /.nyc_output /.tap /coverage +/test-results # IDEA /.idea diff --git a/packages/scratch-svg-renderer/.gitignore b/packages/scratch-svg-renderer/.gitignore index 1fd12495e8..58c573c035 100644 --- a/packages/scratch-svg-renderer/.gitignore +++ b/packages/scratch-svg-renderer/.gitignore @@ -11,6 +11,7 @@ npm-* # Test /.tap +/test-results # Editors /#* diff --git a/packages/scratch-vm/.gitignore b/packages/scratch-vm/.gitignore index 442c1e4103..e44e4d8bac 100644 --- a/packages/scratch-vm/.gitignore +++ b/packages/scratch-vm/.gitignore @@ -9,6 +9,7 @@ npm-* /.nyc_output /.tap /coverage +/test-results # Editor /.idea