pull_request_completed #3407
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
| #-------------------------------- -*- yaml -*- ---------------------------------# | |
| # Copyright Celeritas contributors: see top-level COPYRIGHT file for details | |
| # SPDX-License-Identifier: (Apache-2.0 OR MIT) | |
| #-----------------------------------------------------------------------------# | |
| # Post test results after a pull request | |
| # | |
| # NOTE: this workflow runs on the *develop* branch of the main repository | |
| # after an incoming pull request is run. Changes to this script *will not* | |
| # affect a PR and must first be tested on the develop branch of a fork. | |
| #-----------------------------------------------------------------------------# | |
| name: pull_request_completed | |
| on: | |
| workflow_run: | |
| workflows: ["pull_request"] | |
| types: | |
| - completed | |
| permissions: | |
| actions: read | |
| checks: write | |
| pull-requests: write | |
| jobs: | |
| report-tests: | |
| runs-on: ubuntu-24.04 | |
| env: | |
| ARTIFACTS_DIR: artifacts | |
| steps: | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| # Syntax: https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html | |
| pattern: "+(event-file|test-results-*)" | |
| merge-multiple: false | |
| github-token: ${{secrets.GITHUB_TOKEN}} | |
| run-id: ${{github.event.workflow_run.id}} | |
| path: ${{env.ARTIFACTS_DIR}} | |
| - name: Publish PR comment | |
| uses: EnricoMi/publish-unit-test-result-action@82082dac68ad6a19d980f8ce817e108b9f496c2a # v2.17.1 | |
| if: always() | |
| with: | |
| check_name: "Test summary" | |
| commit: ${{github.event.workflow_run.head_sha}} | |
| event_file: ${{env.ARTIFACTS_DIR}}/event-file/event.json | |
| event_name: ${{github.event.workflow_run.event}} | |
| files: "${{env.ARTIFACTS_DIR}}/**/*.xml" | |
| - name: Publish comments on source code | |
| uses: mikepenz/action-junit-report@db71d41eb79864e25ab0337e395c352e84523afe # v4.3.1 | |
| if: always() | |
| with: | |
| commit: ${{github.event.workflow_run.head_sha}} | |
| report_paths: "${{env.ARTIFACTS_DIR}}/**/*.xml" | |
| # vim: set nowrap tw=100: |