From 6eba057e644d427428a9540c9a8d4906dde41f64 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Tue, 27 Aug 2024 11:23:08 -0400 Subject: [PATCH] Cache rspec persistence file between CI runs (#31065) --- .github/workflows/test-ruby.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/test-ruby.yml b/.github/workflows/test-ruby.yml index 859b23ba66c..3da53c1ae8e 100644 --- a/.github/workflows/test-ruby.yml +++ b/.github/workflows/test-ruby.yml @@ -150,6 +150,19 @@ jobs: bin/rails db:setup bin/flatware fan bin/rails db:test:prepare + - name: Cache RSpec persistence file + uses: actions/cache@v4 + with: + path: | + tmp/rspec/examples.txt + key: rspec-persistence-${{ github.head_ref || github.ref_name }}-${{ github.sha }} + restore-keys: | + rspec-persistence-${{ github.head_ref || github.ref_name }}-${{ github.sha }}-${{ matrix.ruby-version }} + rspec-persistence-${{ github.head_ref || github.ref_name }}-${{ github.sha }} + rspec-persistence-${{ github.head_ref || github.ref_name }} + rspec-persistence-main + rspec-persistence + - run: bin/flatware rspec -r ./spec/flatware_helper.rb - name: Upload coverage reports to Codecov