From 5831aac8c09c11f91363c492729e14b2972d9fa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Norte?= Date: Thu, 19 Nov 2026 09:56:29 -0800 Subject: [PATCH] Skip Fantom CI for platform-only pull requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: ## Context Fantom CI currently runs for every code change, even when a pull request only touches Android- or iOS-specific core files. Avoid building and running the host-based Fantom suite for those changes while keeping RNTester code covered. ## Changes Add a `should_test_fantom` path filter combining the existing Android, iOS, and documentation exclusions, except for all RNTester paths, and use it to gate `build_fantom_runner`. The dependent Fantom test and retry jobs consequently skip as well. Mixed Android/iOS-only changes and platform changes accompanied by documentation also skip Fantom; shared code and RNTester code changes still trigger it. The Android and iOS build filters are unchanged. Push and manual workflow runs retain their existing full coverage. ## Estimated CI impact Based on a random sample of 200 of the 2,012 PR CI runs created from October 22 through November 18, 2026 (UTC): - 19.3% of runs that executed Fantom tests would avoid them (29 of 150). Counting individual test executions, including retries, 18.1% would be avoided (29 of 160). - Estimated Fantom PR runner-cost reduction: 18.5%. At GitHub list prices, this projects to approximately $120/month or $1,400/year, with an approximate 95% sampling interval of $80–155/month. These are sampled workload and list-price savings estimates, not verified invoice savings. Projections assume similar future PR volume and mix; discounts and credits are unknown. RNTester changes remain eligible for Fantom. Changelog: [Internal] Differential Revision: D133248360 --- .github/workflows/test-all.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index f648824ffb5..d2710220405 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -27,6 +27,7 @@ jobs: any_code_change: ${{ steps.filter_exclusions.outputs.any_code_change == 'true' || github.event_name != 'pull_request' }} should_test_android: ${{ steps.filter_exclusions.outputs.should_test_android == 'true' || github.event_name != 'pull_request' }} should_test_ios: ${{ steps.filter_exclusions.outputs.should_test_ios == 'true' || github.event_name != 'pull_request' }} + should_test_fantom: ${{ steps.filter_exclusions.outputs.should_test_fantom == 'true' || github.event_name != 'pull_request' }} debugger_shell: ${{ steps.filter_inclusions.outputs.debugger_shell }} steps: - name: Checkout @@ -65,6 +66,24 @@ jobs: - '!packages/react-native/**/*.gradle*' - '!packages/react-native-popup-menu-android/**' - '!packages/rn-tester/android/**' + should_test_fantom: + - '**' + - '!**/__docs__/**' + - '!**/*.md' + - '!**/LICENSE' + - '!gradle/**' + - '!gradle*' + - '!packages/gradle-plugin/**' + - '!packages/react-native/ReactAndroid/**' + - '!packages/react-native/**/*.java' + - '!packages/react-native/**/*.kt' + - '!packages/react-native/**/*.gradle*' + - '!packages/react-native-popup-menu-android/**' + - '!packages/react-native/React/**' + - '!packages/react-native/ReactApple/**' + - '!packages/react-native/**/*.m' + - '!packages/react-native/**/*.mm' + - '!packages/react-native/**/*.podspec' - name: Check for code changes (inclusion patterns) uses: dorny/paths-filter@209e61402dbca8aa44f967535da6666b284025ed id: filter_inclusions @@ -260,7 +279,7 @@ jobs: build_fantom_runner: runs-on: 8-core-ubuntu needs: [check_code_changes, lint] - if: needs.check_code_changes.outputs.any_code_change == 'true' + if: needs.check_code_changes.outputs.should_test_fantom == 'true' container: image: reactnativecommunity/react-native-android:latest env: