Skip to content

Cache + restore the solr artifacts #3965

Cache + restore the solr artifacts

Cache + restore the solr artifacts #3965

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['3.2', '3.3']
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Write solr_wrapper config
run: |
mkdir -p ~/.solr_wrapper.yml
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 }}