Test Report #874
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'Test Report' | |
| on: | |
| workflow_run: | |
| workflows: ['Run Tests'] | |
| types: | |
| - completed | |
| permissions: | |
| contents: read | |
| actions: read | |
| checks: write | |
| pull-requests: write | |
| jobs: | |
| report: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| # | |
| # The test report is published for every supported nodejs version. But the | |
| # coverage information is reported for the latest nodejs version only. When | |
| # changing this array here make sure to update the latest version below | |
| # (next comment). | |
| # | |
| node-version: [20.x, 22.x] | |
| steps: | |
| - name: Download workflow artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: test-results-${{ matrix.node-version }} | |
| run-id: ${{ github.event.workflow_run.id }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set pr number env | |
| run: | | |
| PR_NUMBER=$(cat pr_number) | |
| echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV | |
| - name: Test Report | |
| uses: phoenix-actions/test-reporting@v15 | |
| id: test-report | |
| with: | |
| artifact: test-results-${{ matrix.node-version }} | |
| name: Mocha Tests (node v${{ matrix.node-version }}) | |
| path: test-results.json | |
| reporter: mocha-json | |
| - name: c8 coverage report | |
| # | |
| # The coverage report is generated for the latest node version only. | |
| # Make sure, to update this when changing the matrix above. | |
| # | |
| if: ${{ matrix.node-version == '22.x' }} | |
| uses: Nef10/lcov-reporter-action@v0.4.0 | |
| with: | |
| pr-number: ${{ env.PR_NUMBER }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} |