From 38f5864729778e9ef541a601b2b367a0b3c95631 Mon Sep 17 00:00:00 2001 From: Cole Eason Date: Tue, 19 May 2026 16:22:43 -0400 Subject: [PATCH 1/7] feat: split perf tests into parallel jobs --- .../workflows/reassurePerformanceTests.yml | 126 +++++++++++++----- 1 file changed, 92 insertions(+), 34 deletions(-) diff --git a/.github/workflows/reassurePerformanceTests.yml b/.github/workflows/reassurePerformanceTests.yml index c3e68b8da619..780fe9b50833 100644 --- a/.github/workflows/reassurePerformanceTests.yml +++ b/.github/workflows/reassurePerformanceTests.yml @@ -7,62 +7,120 @@ on: paths-ignore: [docs/**, help/**, .github/**, contributingGuides/**, tests/**, '**.md', '**.sh'] jobs: - perf-tests: + baseline-perf-tests: if: ${{ github.actor != 'OSBotify' }} runs-on: blacksmith-4vcpu-ubuntu-2404 steps: - - name: Checkout + - name: Checkout baseline branch # v6 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd with: fetch-depth: 0 + - name: Checkout baseline branch + shell: bash + run: | + set -e + BASELINE_BRANCH=${BASELINE_BRANCH:="main"} + git fetch origin "$BASELINE_BRANCH" --no-tags + git checkout --force --detach "origin/$BASELINE_BRANCH" --no-recurse-submodules + - name: Setup NodeJS uses: ./.github/actions/composite/setupNode + - name: Run baseline performance tests + shell: bash + run: NODE_OPTIONS=--experimental-vm-modules npx reassure --baseline + + - name: Upload baseline performance results + # v6 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f + with: + name: reassure-baseline-results + path: ./.reassure/baseline.perf + include-hidden-files: true + + branch-perf-tests: + if: ${{ github.actor != 'OSBotify' }} + runs-on: blacksmith-4vcpu-ubuntu-2404 + steps: + - name: Checkout + # v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + with: + fetch-depth: 0 + - name: Set dummy git credentials run: | git config --global user.email "test@test.com" git config --global user.name "Test" - - name: Get common ancestor commit - run: | - git fetch origin main - common_ancestor=$(git merge-base "${{ github.sha }}" origin/main) - echo "COMMIT_HASH=$common_ancestor" >> "$GITHUB_ENV" - - - name: Clean up deleted files - run: | - DELETED_FILES=$(git diff --name-only --diff-filter=D "$COMMIT_HASH" "${{ github.sha }}") - for file in $DELETED_FILES; do - if [ -n "$file" ]; then - rm -f "$file" - echo "Deleted file: $file" - fi - done - - name: Capture PR head SHA - if: ${{ github.event_name == 'pull_request' }} - run: echo "PR_SHA=${{ github.event.pull_request.head.sha }}" >> "$GITHUB_ENV" - - - name: Run performance testing script + - name: Prepare branch for performance tests shell: bash run: | set -e BASELINE_BRANCH=${BASELINE_BRANCH:="main"} - git fetch origin "$BASELINE_BRANCH" --no-tags --depth=1 - - git checkout --force --detach "origin/$BASELINE_BRANCH" --no-recurse-submodules - npm install --force || (rm -rf node_modules && npm install --force) - NODE_OPTIONS=--experimental-vm-modules npx reassure --baseline - - git checkout --force --detach "${PR_SHA:-${GITHUB_SHA}}" --no-recurse-submodules - - if ! git merge --no-commit --allow-unrelated-histories "$BASELINE_BRANCH" -X ours; then + PR_SHA=${{ github.event.pull_request.head.sha }} + git fetch origin "$BASELINE_BRANCH" --no-tags + common_ancestor=$(git merge-base "$PR_SHA" "origin/$BASELINE_BRANCH") + DELETED_FILES=$(git diff --name-only --diff-filter=D "$common_ancestor" "$PR_SHA") + + git checkout --force --detach "$PR_SHA" --no-recurse-submodules + + for file in $DELETED_FILES; do + if [ -n "$file" ]; then + rm -f "$file" + echo "Deleted file: $file" + fi + done + + if ! git merge --no-commit --allow-unrelated-histories "origin/$BASELINE_BRANCH" -X ours; then git checkout --ours . fi - - npm install --force || (rm -rf node_modules && npm install --force) - NODE_OPTIONS=--experimental-vm-modules npx reassure --branch + + - name: Setup NodeJS + uses: ./.github/actions/composite/setupNode + + - name: Run branch performance tests + shell: bash + run: NODE_OPTIONS=--experimental-vm-modules npx reassure --branch="${{ github.head_ref }}" --no-compare + + - name: Upload branch performance results + # v6 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f + with: + name: reassure-branch-results + path: ./.reassure/current.perf + include-hidden-files: true + + validate-perf-tests: + if: ${{ github.actor != 'OSBotify' }} + runs-on: blacksmith-4vcpu-ubuntu-2404 + needs: [baseline-perf-tests, branch-perf-tests] + steps: + - name: Checkout + # v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + + - name: Setup NodeJS + uses: ./.github/actions/composite/setupNode + + - name: Download baseline performance results + # v7 + uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 + with: + name: reassure-baseline-results + path: ./.reassure + + - name: Download branch performance results + # v7 + uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 + with: + name: reassure-branch-results + path: ./.reassure + + - name: Compare performance results + run: node -e "require('@callstack/reassure-compare').compare().catch((error) => { console.error(error); process.exit(1); })" - name: Validate output.json id: validateReassureOutput From 5370c819c7b8113e822a1789c4e13f4130255e70 Mon Sep 17 00:00:00 2001 From: Cole Eason Date: Tue, 19 May 2026 16:22:56 -0400 Subject: [PATCH 2/7] fix: rightsize runners from blacksmith analysis --- .github/workflows/buildWeb.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildWeb.yml b/.github/workflows/buildWeb.yml index 0562ff333e7f..5eef0ed6d1dd 100644 --- a/.github/workflows/buildWeb.yml +++ b/.github/workflows/buildWeb.yml @@ -30,7 +30,7 @@ on: jobs: build: name: Build Web - runs-on: blacksmith-32vcpu-ubuntu-2404 + runs-on: blacksmith-8vcpu-ubuntu-2404 outputs: TAR_FILENAME: webBuild.tar.gz ZIP_FILENAME: webBuild.zip diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 04ae8701a626..433fdd02cc90 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ concurrency: jobs: jest: if: ${{ github.event.head_commit.author.name != 'OSBotify' && github.event.head_commit.author.name != 'imgbot[bot]' || github.event_name == 'workflow_call' }} - runs-on: blacksmith-4vcpu-ubuntu-2404 + runs-on: blacksmith-8vcpu-ubuntu-2404 env: CI: true NODE_OPTIONS: "--experimental-vm-modules --max-old-space-size=8192" From 4c880a306d0c9a4ff030bccb89000493fc2ee09e Mon Sep 17 00:00:00 2001 From: Cole Eason Date: Tue, 19 May 2026 16:29:48 -0400 Subject: [PATCH 3/7] touch file to trigger tests --- src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index 8ef6d1a55f19..cd873052a3d8 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -63,7 +63,7 @@ import {SplashScreenStateContextProvider} from './SplashScreenStateContext'; LogBox.ignoreLogs([ // Basically it means that if the app goes in the background and back to foreground on Android, // the timer is lost. Currently Expensify is using a 30 minutes interval to refresh personal details. - // More details here: https://git.io/JJYeb + // More details here: https://git.io/JJYeb FOO 'Setting a timer for a long period of time', ]); From f62b97e01e31399939cb60e42ce084e6fe6c09a5 Mon Sep 17 00:00:00 2001 From: Cole Eason Date: Tue, 19 May 2026 17:05:02 -0400 Subject: [PATCH 4/7] feat: use blacksmith checkout caching --- .github/workflows/reassurePerformanceTests.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/reassurePerformanceTests.yml b/.github/workflows/reassurePerformanceTests.yml index 780fe9b50833..7bf67f136763 100644 --- a/.github/workflows/reassurePerformanceTests.yml +++ b/.github/workflows/reassurePerformanceTests.yml @@ -12,8 +12,8 @@ jobs: runs-on: blacksmith-4vcpu-ubuntu-2404 steps: - name: Checkout baseline branch - # v6 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + # v1 + uses: useblacksmith/checkout@41cdeedae8edb2e684ba22896a5fd2a3cb85db6b with: fetch-depth: 0 @@ -45,8 +45,8 @@ jobs: runs-on: blacksmith-4vcpu-ubuntu-2404 steps: - name: Checkout - # v6 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + # v1 + uses: useblacksmith/checkout@41cdeedae8edb2e684ba22896a5fd2a3cb85db6b with: fetch-depth: 0 @@ -99,8 +99,8 @@ jobs: needs: [baseline-perf-tests, branch-perf-tests] steps: - name: Checkout - # v6 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + # v1 + uses: useblacksmith/checkout@41cdeedae8edb2e684ba22896a5fd2a3cb85db6b - name: Setup NodeJS uses: ./.github/actions/composite/setupNode From f84036c504db0b85fd4175ef38e0afb8b4eb45bf Mon Sep 17 00:00:00 2001 From: Cole Eason Date: Tue, 19 May 2026 17:44:48 -0400 Subject: [PATCH 5/7] fix: no need for deep checkout and manual merge --- .../workflows/reassurePerformanceTests.yml | 34 +------------------ 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/.github/workflows/reassurePerformanceTests.yml b/.github/workflows/reassurePerformanceTests.yml index 7bf67f136763..b5593840ff5e 100644 --- a/.github/workflows/reassurePerformanceTests.yml +++ b/.github/workflows/reassurePerformanceTests.yml @@ -14,8 +14,6 @@ jobs: - name: Checkout baseline branch # v1 uses: useblacksmith/checkout@41cdeedae8edb2e684ba22896a5fd2a3cb85db6b - with: - fetch-depth: 0 - name: Checkout baseline branch shell: bash @@ -47,43 +45,13 @@ jobs: - name: Checkout # v1 uses: useblacksmith/checkout@41cdeedae8edb2e684ba22896a5fd2a3cb85db6b - with: - fetch-depth: 0 - - - name: Set dummy git credentials - run: | - git config --global user.email "test@test.com" - git config --global user.name "Test" - - - name: Prepare branch for performance tests - shell: bash - run: | - set -e - BASELINE_BRANCH=${BASELINE_BRANCH:="main"} - PR_SHA=${{ github.event.pull_request.head.sha }} - git fetch origin "$BASELINE_BRANCH" --no-tags - common_ancestor=$(git merge-base "$PR_SHA" "origin/$BASELINE_BRANCH") - DELETED_FILES=$(git diff --name-only --diff-filter=D "$common_ancestor" "$PR_SHA") - - git checkout --force --detach "$PR_SHA" --no-recurse-submodules - - for file in $DELETED_FILES; do - if [ -n "$file" ]; then - rm -f "$file" - echo "Deleted file: $file" - fi - done - - if ! git merge --no-commit --allow-unrelated-histories "origin/$BASELINE_BRANCH" -X ours; then - git checkout --ours . - fi - name: Setup NodeJS uses: ./.github/actions/composite/setupNode - name: Run branch performance tests shell: bash - run: NODE_OPTIONS=--experimental-vm-modules npx reassure --branch="${{ github.head_ref }}" --no-compare + run: NODE_OPTIONS=--experimental-vm-modules npx reassure --branch="${{ github.head_ref }}" --commit-hash="${{ github.event.pull_request.head.sha }}" --no-compare - name: Upload branch performance results # v6 From b86a129bdd6a03ebb3aa0acebcc7627be53df560 Mon Sep 17 00:00:00 2001 From: Cole Eason Date: Wed, 20 May 2026 17:32:18 -0400 Subject: [PATCH 6/7] revert test triggering change --- src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index cd873052a3d8..8ef6d1a55f19 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -63,7 +63,7 @@ import {SplashScreenStateContextProvider} from './SplashScreenStateContext'; LogBox.ignoreLogs([ // Basically it means that if the app goes in the background and back to foreground on Android, // the timer is lost. Currently Expensify is using a 30 minutes interval to refresh personal details. - // More details here: https://git.io/JJYeb FOO + // More details here: https://git.io/JJYeb 'Setting a timer for a long period of time', ]); From ab1be28b81c5460ed5ed9609d04e85b1dba9b337 Mon Sep 17 00:00:00 2001 From: Cole Eason Date: Wed, 20 May 2026 17:39:01 -0400 Subject: [PATCH 7/7] Fix: actionlint error --- .github/workflows/reassurePerformanceTests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reassurePerformanceTests.yml b/.github/workflows/reassurePerformanceTests.yml index b5593840ff5e..7a2f7b2f4800 100644 --- a/.github/workflows/reassurePerformanceTests.yml +++ b/.github/workflows/reassurePerformanceTests.yml @@ -51,7 +51,10 @@ jobs: - name: Run branch performance tests shell: bash - run: NODE_OPTIONS=--experimental-vm-modules npx reassure --branch="${{ github.head_ref }}" --commit-hash="${{ github.event.pull_request.head.sha }}" --no-compare + env: + BRANCH: ${{ github.head_ref }} + COMMIT_HASH: ${{ github.event.pull_request.head.sha }} + run: NODE_OPTIONS=--experimental-vm-modules npx reassure --branch="$BRANCH" --commit-hash="$COMMIT_HASH" --no-compare - name: Upload branch performance results # v6