From d513f2cb5608ccd5ff75686f374aa8acd46525a5 Mon Sep 17 00:00:00 2001 From: Wes Rich Date: Fri, 3 Jul 2026 13:09:09 -0400 Subject: [PATCH 1/3] Actually save the turbo-test runtime log cache #patch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The restore step for tmp/turbo_rspec_runtime.log never had a matching save step in either composite action, so it always missed on every run, in every repo using these actions — parallel_rspec had no historical per-file timing to balance work across workers, splitting files by count instead of duration. Also dropped the _${{ github.run_attempt }} suffix from both cache keys. It only matters for retry-safety on re-runs of the same commit; without it, a same-commit re-run's save is a harmless no-op against an already-existing key, and restore-keys prefix fallback still finds the most recent data either way. Co-Authored-By: Claude Sonnet 4.6 --- linting-and-non-system-tests/action.yml | 9 ++++++++- system-tests/action.yml | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/linting-and-non-system-tests/action.yml b/linting-and-non-system-tests/action.yml index 8cd4560..2b9140f 100644 --- a/linting-and-non-system-tests/action.yml +++ b/linting-and-non-system-tests/action.yml @@ -52,7 +52,7 @@ runs: uses: actions/cache/restore@v5 with: path: tmp/turbo_rspec_runtime.log - key: parallel-spec-non-system-runtimes-${{ github.sha }}_${{ github.run_attempt }} + key: parallel-spec-non-system-runtimes-${{ github.sha }} restore-keys: parallel-spec-non-system-runtimes- - name: Setup Parallel Databases @@ -68,6 +68,13 @@ runs: shell: bash run: bundle exec parallel_rspec --verbose --exclude-pattern "/system/" + - name: Save Turbo-Test Runtime Stats + if: always() + uses: actions/cache/save@v5 + with: + path: tmp/turbo_rspec_runtime.log + key: parallel-spec-non-system-runtimes-${{ github.sha }} + - name: Publish Test Results uses: mikepenz/action-junit-report@v6 if: success() || failure() diff --git a/system-tests/action.yml b/system-tests/action.yml index 69245ac..376b3dc 100644 --- a/system-tests/action.yml +++ b/system-tests/action.yml @@ -66,7 +66,7 @@ runs: uses: actions/cache/restore@v5 with: path: tmp/turbo_rspec_runtime.log - key: parallel-spec-system-runtimes-${{ github.sha }}_${{ github.run_attempt }} + key: parallel-spec-system-runtimes-${{ github.sha }} restore-keys: parallel-spec-system-runtimes- - name: Setup Parallel Databases @@ -80,6 +80,13 @@ runs: GOOGLE_CHROME_BIN: ${{ case(inputs.web-driver == 'selenium', steps.setup-chrome.outputs.chrome-path, '') }} CAPYBARA_DRIVER: js + - name: Save Turbo-Test Runtime Stats + if: always() + uses: actions/cache/save@v5 + with: + path: tmp/turbo_rspec_runtime.log + key: parallel-spec-system-runtimes-${{ github.sha }} + - name: Publish Test Results uses: mikepenz/action-junit-report@v6 if: success() || failure() From 5d838ca820b3e4d3f27c8fec7d9dce57798735aa Mon Sep 17 00:00:00 2001 From: Wes Rich Date: Fri, 3 Jul 2026 13:27:46 -0400 Subject: [PATCH 2/3] Namespace turbo-test cache keys by branch, not just commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Keying purely by commit sha means every normal commit is a guaranteed miss on the exact key (a sha only repeats on a manual re-run), so every run was falling through to the bare-prefix restore-key, which picks up whatever branch last happened to save — not necessarily representative of the current branch's test surface. Now keys are branch-namespaced: parallel-spec-*-runtimes--. restore-keys first tries the same branch's most recent save (relevant: recent commits on this branch look like the next one), falling back to the global prefix only for a brand-new branch with no history yet. Co-Authored-By: Claude Sonnet 4.6 --- linting-and-non-system-tests/action.yml | 8 +++++--- system-tests/action.yml | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/linting-and-non-system-tests/action.yml b/linting-and-non-system-tests/action.yml index 2b9140f..2027929 100644 --- a/linting-and-non-system-tests/action.yml +++ b/linting-and-non-system-tests/action.yml @@ -52,8 +52,10 @@ runs: uses: actions/cache/restore@v5 with: path: tmp/turbo_rspec_runtime.log - key: parallel-spec-non-system-runtimes-${{ github.sha }} - restore-keys: parallel-spec-non-system-runtimes- + key: parallel-spec-non-system-runtimes-${{ github.head_ref || github.ref_name }}-${{ github.sha }} + restore-keys: | + parallel-spec-non-system-runtimes-${{ github.head_ref || github.ref_name }}- + parallel-spec-non-system-runtimes- - name: Setup Parallel Databases shell: bash @@ -73,7 +75,7 @@ runs: uses: actions/cache/save@v5 with: path: tmp/turbo_rspec_runtime.log - key: parallel-spec-non-system-runtimes-${{ github.sha }} + key: parallel-spec-non-system-runtimes-${{ github.head_ref || github.ref_name }}-${{ github.sha }} - name: Publish Test Results uses: mikepenz/action-junit-report@v6 diff --git a/system-tests/action.yml b/system-tests/action.yml index 376b3dc..c425c41 100644 --- a/system-tests/action.yml +++ b/system-tests/action.yml @@ -66,8 +66,10 @@ runs: uses: actions/cache/restore@v5 with: path: tmp/turbo_rspec_runtime.log - key: parallel-spec-system-runtimes-${{ github.sha }} - restore-keys: parallel-spec-system-runtimes- + key: parallel-spec-system-runtimes-${{ github.head_ref || github.ref_name }}-${{ github.sha }} + restore-keys: | + parallel-spec-system-runtimes-${{ github.head_ref || github.ref_name }}- + parallel-spec-system-runtimes- - name: Setup Parallel Databases shell: bash @@ -85,7 +87,7 @@ runs: uses: actions/cache/save@v5 with: path: tmp/turbo_rspec_runtime.log - key: parallel-spec-system-runtimes-${{ github.sha }} + key: parallel-spec-system-runtimes-${{ github.head_ref || github.ref_name }}-${{ github.sha }} - name: Publish Test Results uses: mikepenz/action-junit-report@v6 From 3f948be7661da822062eb82d42bd750f2d402a32 Mon Sep 17 00:00:00 2001 From: Wes Rich Date: Fri, 3 Jul 2026 14:45:45 -0400 Subject: [PATCH 3/3] Publish Test Results on cancellation too, matching shared workflow success() || failure() skips this step on a cancelled run; always() still attempts it, consistent with what rails-ci.yml already does. Co-Authored-By: Claude Sonnet 4.6 --- linting-and-non-system-tests/action.yml | 2 +- system-tests/action.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/linting-and-non-system-tests/action.yml b/linting-and-non-system-tests/action.yml index 2027929..888c8e9 100644 --- a/linting-and-non-system-tests/action.yml +++ b/linting-and-non-system-tests/action.yml @@ -79,7 +79,7 @@ runs: - name: Publish Test Results uses: mikepenz/action-junit-report@v6 - if: success() || failure() + if: always() with: check_name: Test Results report_paths: tmp/rspec-*.xml diff --git a/system-tests/action.yml b/system-tests/action.yml index c425c41..3f88378 100644 --- a/system-tests/action.yml +++ b/system-tests/action.yml @@ -91,7 +91,7 @@ runs: - name: Publish Test Results uses: mikepenz/action-junit-report@v6 - if: success() || failure() + if: always() with: check_name: Test Results report_paths: tmp/rspec-*.xml