Skip to content

Commit

Permalink
.github: Allow testing an Asterisk PR against a testsuite PR
Browse files Browse the repository at this point in the history
  • Loading branch information
gtjoseph committed Jul 26, 2024
1 parent e4b0ad4 commit 2476bc1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/OnPRStateChanged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,34 @@ jobs:
runs-on: ubuntu-latest
outputs:
vars: ${{ steps.setvars.outputs.control_data }}
testsuite_test_pr: ${{ steps.testsuitepr.outputs.testsuite_test_pr }}
steps:
- id: wait
run: |
echo "::notice::Waiting for 2 minutes to give user a chance to add PR comments"
sleep 120
exit 0
- id: setvars
uses: asterisk/asterisk-ci-actions/GetRepoControlData@main
with:
repo: ${{ github.event.repository.name}}

- name: GetTestsuitePR
id: testsuitepr
uses: asterisk/asterisk-ci-actions/GetTestsuitePRFromAsteriskPR@main
with:
repo: ${{github.repository}}
pr_number: ${{github.event.number}}
testsuite_test_pr_regex: ${{ fromJSON(steps.setvars.outputs.control_data).TESTSUITE_TEST_PR_REGEX }}
testsuite_test_auto_merge_regex: ${{ fromJSON(steps.setvars.outputs.control_data).TESTSUITE_TEST_AUTO_MERGE_REGEX }}
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: DumpEnvironment
uses: asterisk/asterisk-ci-actions/DumpEnvironmentAction@main
with:
action-vars: ${{ toJSON(steps.setvars.outputs) }}
action-inputs: ${{ toJSON(steps.testsuitepr.outputs) }}

PRCheck:
name: PRCheck
Expand All @@ -52,6 +71,7 @@ jobs:
build_options: ${{ fromJSON(needs.Setup.outputs.vars).BUILD_OPTIONS }}
unittest_command: ${{ fromJSON(needs.Setup.outputs.vars).UNITTEST_COMMAND }}
testsuite_repo: ${{ fromJSON(needs.Setup.outputs.vars).TESTSUITE_REPO }}
testsuite_test_pr: ${{ needs.Setup.outputs.testsuite_test_pr }}
gatetest_list: ${{ fromJSON(needs.Setup.outputs.vars).GATETEST_LIST }}
gatetest_commands: ${{ fromJSON(needs.Setup.outputs.vars).GATETEST_COMMANDS }}
secrets:
Expand Down

0 comments on commit 2476bc1

Please sign in to comment.