From 042f95084bd88210f4b0d014d378d8e3324f5a62 Mon Sep 17 00:00:00 2001 From: Chris Beer Date: Wed, 3 Jul 2024 08:44:10 -0700 Subject: [PATCH] Cache + restore the solr artifacts --- .github/workflows/ruby.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 0e30a5978..677d442ea 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -19,5 +19,22 @@ jobs: with: ruby-version: ${{ matrix.ruby }} bundler-cache: true + - name: Write solr_wrapper config + run: | + mkdir -p ~/.solr-artifacts + echo "download_dir: ~/.solr-artifacts" > ~/.solr_wrapper.yml + - name: Cache Solr + id: cache-solr-restore + uses: actions/cache/restore@v4 + with: + path: ~/.solr-artifacts + key: solr-9.6.1 - name: Run tests run: bundle exec rake + - name: Save Solr + id: cache-solr-save + uses: actions/cache/save@v4 + with: + path: | + ~/.solr-artifacts + key: ${{ steps.cache-solr-restore.outputs.cache-primary-key }}