Annotate CI run with test results #10
This file contains 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: Annotate CI run with test results | |
on: | |
workflow_run: | |
workflows: | |
- "Run Tests" | |
types: | |
- completed | |
permissions: | |
actions: read | |
contents: read | |
checks: write | |
pull-requests: write | |
jobs: | |
annotate: | |
name: Annotate CI run with test results | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion != 'cancelled' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [18.x, 20.x, 22.x] | |
timeout-minutes: 5 | |
steps: | |
- name: Annotate CI run with test results | |
uses: dorny/test-reporter@v1 | |
with: | |
artifact: test-reports-${{ matrix.node-version }} | |
name: Test Results (${{matrix.node-version}} | |
path: "test-results.json" | |
reporter: mocha-json | |
token: ${{ secrets.GITHUB_TOKEN }} |