From 3a31bbacab57a08c6b5619a030c1a3ce5ba0718e Mon Sep 17 00:00:00 2001 From: Blazebrain Date: Fri, 25 Sep 2026 18:49:11 +0100 Subject: [PATCH] fix: skip integration tests on branches without the test suites --- .github/workflows/integration_tests.yml | 26 +++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index da1cf5ed3..0b964a906 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -17,11 +17,33 @@ concurrency: cancel-in-progress: true jobs: - android-integration-tests: + check-suites: if: github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.fork == false + runs-on: ubuntu-latest + outputs: + present: ${{ steps.suites.outputs.present }} + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + sparse-checkout: integration_test/suites + + - name: Check the branch has the test suites + id: suites + run: | + if [[ -d integration_test/suites/tier0 ]]; then + echo "present=true" >> "$GITHUB_OUTPUT" + else + echo "present=false" >> "$GITHUB_OUTPUT" + echo "::notice::This branch has no integration test suites yet, sync it with dev to run them" + fi + + android-integration-tests: + needs: check-suites + if: needs.check-suites.outputs.present == 'true' uses: ./.github/workflows/reusable-integration-test.yml with: - ref: ${{ github.sha }} + ref: ${{ github.event.pull_request.head.sha || github.sha }} suite_dir: integration_test/suites test_tier: tier0 slack_notify: true