From 1277cea1b7d447bfa1881c04c77c3bc3f74d7880 Mon Sep 17 00:00:00 2001 From: Ammar Ansari Date: Wed, 6 Aug 2025 16:43:07 +0200 Subject: [PATCH 1/2] Trigger test CI using repository_dispatch --- .github/workflows/unit-tests.yml | 51 +++++++++++++------------------- 1 file changed, 20 insertions(+), 31 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 1423d43cb..75d195406 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -2,7 +2,7 @@ name: Tests on: push: - branches: [main, joao/client_package_renamed] + branches: [main] pull_request: branches: [main, dev] workflow_dispatch: @@ -36,33 +36,22 @@ jobs: RELAY_HOST: ${{ secrets.RELAY_HOST }} RELAY_PROJECT: ${{ secrets.RELAY_PROJECT }} RELAY_TOKEN: ${{ secrets.RELAY_TOKEN }} - run-browser-js-staging: - name: Browser SDK staging - needs: tests - uses: ./.github/workflows/browser-js-staging.yml - secrets: inherit - run-browser-js-production: - name: Browser SDK production - needs: tests - uses: ./.github/workflows/browser-js-production.yml - secrets: inherit - run-realtime-api-staging: - name: RealtimeAPI SDK staging - needs: tests - uses: ./.github/workflows/realtime-api-staging.yml - secrets: inherit - run-realtime-api-production: - name: RealtimeAPI SDK production - needs: tests - uses: ./.github/workflows/realtime-api-production.yml - secrets: inherit - run-browser-client-staging: - name: Browser Client SDK staging - needs: tests - uses: ./.github/workflows/browser-client-staging.yml - secrets: inherit - run-browser-client-production: - name: Browser Client SDK production - needs: tests - uses: ./.github/workflows/browser-client-production.yml - secrets: inherit + + dispatch: + runs-on: ubuntu-latest + steps: + - name: Dispatch Call Fabric SDK E2E Tests + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.SW_WORKFLOW_DISPATCH }} + # TODO: Move this to a dedicated JS module? + script: | + await github.rest.repos.createDispatchEvent({ + owner: 'signalwire', + repo: 'rtc-testing', + event_type: 'public-pr-trigger', + client_payload: { + pr_number: context.payload.pull_request.number, + head_ref: context.payload.pull_request.head.ref + } + }) From dcd2dd377fe575e136d86e1cbf53baa3f06b6e0b Mon Sep 17 00:00:00 2001 From: Ammar Ansari Date: Wed, 6 Aug 2025 17:24:33 +0200 Subject: [PATCH 2/2] add logs --- .github/workflows/unit-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 75d195406..29b105822 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -46,7 +46,7 @@ jobs: github-token: ${{ secrets.SW_WORKFLOW_DISPATCH }} # TODO: Move this to a dedicated JS module? script: | - await github.rest.repos.createDispatchEvent({ + const resp = await github.rest.repos.createDispatchEvent({ owner: 'signalwire', repo: 'rtc-testing', event_type: 'public-pr-trigger', @@ -55,3 +55,4 @@ jobs: head_ref: context.payload.pull_request.head.ref } }) + console.log('dispatch response:', resp);