Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR deployment test streamlined #853

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 19 additions & 21 deletions .github/workflows/pr_deployment_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,33 @@ name: PR Deployment Testing
on:
pull_request:
types: [ labeled ]
workflow_dispatch:
inputs:
pr:
description: PR number

jobs:
pr_testing:
if: ${{ github.event.label.name == 'pr-deployment' }}
runs-on: ubuntu-latest
permissions:
pull-requests: write
needs: deployment_ready
steps:
- uses: actions/checkout@v2
- name: Trigger tests on PR deployment
id: test_pr
run: |
TEST_RESULTS=$(bash ./.github/workflows/scripts/pr_deployment_test.sh invoke_pr_test 81148901 ${{ secrets.TESTING_TRIGGER_PAT }} ${{ github.event.number }})
echo "TEST_RESULTS=${TEST_RESULTS}" >> $GITHUB_OUTPUT
shell: bash
- name: report test results
uses: mshick/add-pr-comment@v2
with:
message: |
${{ steps.test_pr.outputs.TEST_RESULTS }}


deployment_ready:
if: ${{ github.event.label.name == 'pr-deployment' }}
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Wait for PR deployment completion
run: bash ./.github/workflows/scripts/pr_deployment_test.sh wait_for_pr_deployment ${{ github.event.number }}
shell: bash

- name: Trigger tests on PR deployment
id: test_pr
run: |
TEST_RESULTS=$(bash ./.github/workflows/scripts/pr_deployment_test.sh invoke_pr_test 81148901 ${{ secrets.TESTING_TRIGGER_PAT }} ${{ github.event.number }})
echo "TEST_RESULTS=${TEST_RESULTS}" >> $GITHUB_OUTPUT
shell: bash

- name: report test results
uses: mshick/add-pr-comment@v2
with:
issue: ${{ inputs.pr }}
message: |
${{ steps.test_pr.outputs.TEST_RESULTS }}
Loading