sp custom schema #17
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: Full Test Suite (TESTALL) | |
| # Run all test suites including big tests | |
| # Trigger via: | |
| # - Comment "/testall" on a PR | |
| # - Actions tab -> Run workflow | |
| # - gh workflow run "Full Test Suite (TESTALL)" | |
| on: | |
| issue_comment: | |
| types: [created] | |
| workflow_dispatch: | |
| inputs: | |
| ref: | |
| description: 'Branch, tag, or SHA to test' | |
| required: false | |
| default: '' | |
| jobs: | |
| # For comment triggers, validate and get PR info | |
| check-trigger: | |
| name: Check Trigger | |
| runs-on: self-hosted | |
| permissions: | |
| pull-requests: read | |
| issues: write | |
| if: > | |
| github.event_name == 'workflow_dispatch' || | |
| (github.event_name == 'issue_comment' && | |
| github.event.issue.pull_request && | |
| github.event.comment.body == '/testall') | |
| outputs: | |
| ref: ${{ steps.get-ref.outputs.ref }} | |
| should_run: ${{ steps.get-ref.outputs.should_run }} | |
| steps: | |
| - name: Get ref to test | |
| id: get-ref | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| if (context.eventName === 'workflow_dispatch') { | |
| const ref = '${{ inputs.ref }}' || context.ref; | |
| core.setOutput('ref', ref); | |
| core.setOutput('should_run', 'true'); | |
| console.log(`workflow_dispatch: testing ref ${ref}`); | |
| return; | |
| } | |
| // issue_comment event - get PR head SHA | |
| const { data: pr } = await github.rest.pulls.get({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: context.issue.number | |
| }); | |
| core.setOutput('ref', pr.head.sha); | |
| core.setOutput('should_run', 'true'); | |
| console.log(`PR #${pr.number}: testing SHA ${pr.head.sha}`); | |
| // Add reaction to show we received the command | |
| await github.rest.reactions.createForIssueComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| comment_id: context.payload.comment.id, | |
| content: 'rocket' | |
| }); | |
| # Run the full test suite | |
| run-tests: | |
| name: Build and Run All Tests | |
| needs: check-trigger | |
| if: needs.check-trigger.outputs.should_run == 'true' | |
| uses: ./.github/workflows/full-test-suite.yml | |
| with: | |
| ref: ${{ needs.check-trigger.outputs.ref }} | |
| build-type: debug | |
| cache-key-prefix: testall | |
| artifact-prefix: testall | |
| run-all-suites-conditional: false |