Skip to content

Commit

Permalink
Enable permission for PRs to publish unit test reports
Browse files Browse the repository at this point in the history
  • Loading branch information
Stealthii committed Apr 17, 2024
1 parent 6efffe4 commit 12fdb7a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: BATS Tests
name: bats

on:
pull_request:
push:
branches: [master, next]

workflow_dispatch:

jobs:
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: report
on:
workflow_run:
workflows: [bats]
types: [completed]

permissions:
checks: write

jobs:
checks:
runs-on: ubuntu-latest
steps:
- name: Download Test Report
uses: dawidd6/action-download-artifact@v3
with:
name: report-.*
name_is_regexp: true
workflow: ${{ github.event.workflow.id }}
run_id: ${{ github.event.workflow_run.id }}

- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
with:
commit: ${{github.event.workflow_run.head_sha}}
report_paths: "**/report.xml"

0 comments on commit 12fdb7a

Please sign in to comment.