Tests triggered by PR: Update fastrpc_1.0.4.bb #2985
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 PR build | |
| run-name: "Tests triggered by PR: ${{ github.event.workflow_run.display_title }}" | |
| on: | |
| workflow_run: | |
| workflows: ["Build on PR"] | |
| types: | |
| - completed | |
| permissions: | |
| checks: write | |
| pull-requests: write | |
| contents: read | |
| packages: read | |
| jobs: | |
| test: | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| uses: ./.github/workflows/test.yml | |
| secrets: inherit | |
| with: | |
| build_id: ${{ github.event.workflow_run.id }} | |
| comment-on-pr: | |
| name: "Comment on PR" | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download Result Summary | |
| id: download-result-summary | |
| uses: actions/download-artifact@v7 | |
| with: | |
| artifact-ids: ${{ needs.test.outputs.summary_id }} | |
| path: results_summary | |
| - name: Download event file | |
| uses: actions/download-artifact@v7 | |
| with: | |
| run-id: ${{ github.event.workflow_run.id }} | |
| path: artifacts | |
| github-token: ${{ github.token }} | |
| - name: "List files" | |
| run: | | |
| echo $GITHUB_WORKSPACE | |
| ls -R $GITHUB_WORKSPACE | |
| - name: Prepare PR comment | |
| id: pr_comment_prep | |
| run: | | |
| echo "## Test run [workflow](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" > pr-comment.txt | |
| echo "## Test jobs for commit ${{ github.event.workflow_run.head_sha }}" >> pr-comment.txt | |
| PR_NUMBER=$(cat "artifacts/Event File/event.json" | jq -r ".number") | |
| RESULT_FILE_NAME=$(find ./results_summary/ -type f) | |
| cat "${RESULT_FILE_NAME}" >> pr-comment.txt | |
| echo "pr_number=$PR_NUMBER" >> $GITHUB_OUTPUT | |
| - name: Comment on PR | |
| uses: thollander/actions-comment-pull-request@v3 | |
| with: | |
| file-path: pr-comment.txt | |
| pr-number: ${{ steps.pr_comment_prep.outputs.pr_number }} | |
| publish-test-results: | |
| uses: ./.github/workflows/publish-results.yml | |
| secrets: inherit | |
| needs: [test] | |
| with: | |
| commit: ${{ github.event.workflow_run.sha }} | |
| event_file: artifacts/Event File/event.json | |
| event_name: ${{ github.event.workflow_run.event }} | |
| workflow_id: ${{ github.event.workflow_run.id }} |