diff --git a/.github/workflows/on-pull-request.yml b/.github/workflows/on-pull-request.yml index 13e3308..7084a90 100644 --- a/.github/workflows/on-pull-request.yml +++ b/.github/workflows/on-pull-request.yml @@ -47,4 +47,27 @@ jobs: - name: Install dependencies run: bundle install - name: Test - run: ruby tests/all.rb \ No newline at end of file + run: ruby tests/all.rb + test-e2e: + name: Test E2E + runs-on: ubuntu-latest + steps: + - uses: actions-cool/check-user-permission@v2 + with: + require: write + id: check_permission + - name: Trigger E2E Workflow in backend-sdk-tests and Wait + if: ${{ steps.check_permission.outputs.require-result == 'true' }} + uses: convictional/trigger-workflow-and-wait@v1.6.5 + with: + owner: passageidentity + repo: backend-sdk-tests + workflow_file_name: integration-tests-complete.yml + github_token: ${{ secrets.BE_SDK_PAT }} + # github.head_ref is only available on PR events, while github.ref_name provides the branch name on other events + client_payload: >- + { + "target_sdk":"ruby", + "use_test_release":true, + "sdk_branch_ref":"${{ github.head_ref || github.ref_name }}" + } \ No newline at end of file