Platform Tests (All) #205
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: Platform Tests (All) | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| sha: | |
| description: 'Commit SHA to test and update check status on' | |
| required: false | |
| default: '' | |
| permissions: | |
| contents: write | |
| jobs: | |
| vercel: | |
| uses: ./.github/workflows/platform-tests-vercel.yml | |
| with: | |
| sha: ${{ inputs.sha }} | |
| secrets: inherit | |
| report-status: | |
| if: always() | |
| needs: [vercel] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Determine outcome | |
| id: outcome | |
| run: | | |
| if [ "${{ contains(needs.*.result, 'failure') }}" = "true" ]; then | |
| echo "conclusion=failure" >> "$GITHUB_OUTPUT" | |
| echo "title=Platform tests failed" >> "$GITHUB_OUTPUT" | |
| echo "summary=One or more platform test jobs failed. See the [workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details." >> "$GITHUB_OUTPUT" | |
| elif [ "${{ contains(needs.*.result, 'cancelled') }}" = "true" ]; then | |
| echo "conclusion=cancelled" >> "$GITHUB_OUTPUT" | |
| echo "title=Platform tests cancelled" >> "$GITHUB_OUTPUT" | |
| echo "summary=Platform tests were cancelled before completing." >> "$GITHUB_OUTPUT" | |
| else | |
| echo "conclusion=success" >> "$GITHUB_OUTPUT" | |
| echo "title=Platform tests passed" >> "$GITHUB_OUTPUT" | |
| echo "summary=All platform test jobs passed." >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Report results | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| gh api repos/${{ github.repository }}/dispatches \ | |
| -f event_type=platform-tests-result \ | |
| -f 'client_payload[sha]=${{ inputs.sha || github.sha }}' \ | |
| -f 'client_payload[conclusion]=${{ steps.outcome.outputs.conclusion }}' \ | |
| -f 'client_payload[title]=${{ steps.outcome.outputs.title }}' \ | |
| -f 'client_payload[summary]=${{ steps.outcome.outputs.summary }}' \ | |
| -f 'client_payload[details_url]=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' |