From 75278f15c1ae1e0a7c09d429e0f80c13cd73c8f7 Mon Sep 17 00:00:00 2001 From: Vince Broz Date: Sun, 12 Oct 2025 14:10:25 -0400 Subject: [PATCH 1/7] Set up initial caching --- .github/workflows/linting.yml | 4 +-- .github/workflows/plugins.yml | 44 +++++++++++++++++++++++++++++++++ .github/workflows/typecheck.yml | 11 +++++++++ 3 files changed, 57 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index b4ef26bfe..0e53412cc 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -39,9 +39,9 @@ jobs: run: | bundle update rbs # use latest available for this Ruby version - - name: Restore cache of gem annotations + - name: Cache gem annotations id: dot-cache-restore - uses: actions/cache/restore@v4 + uses: actions/cache@v4 with: key: | 2025-06-26-09-${{ runner.os }}-dot-cache-${{ hashFiles('Gemfile.lock') }} diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index b5984f3cb..9784806dc 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -35,6 +35,17 @@ jobs: echo 'gem "solargraph-rspec"' >> .Gemfile bundle install bundle update rbs + - name: Cache gem annotations + id: dot-cache-restore + uses: actions/cache@v4 + with: + key: | + 2025-06-26-09-${{ runner.os }}-dot-cache-${{ hashFiles('Gemfile.lock') }} + restore-keys: | + 2025-06-26-09-${{ runner.os }}-dot-cache + 2025-06-26-09-${{ runner.os }}-dot-cache- + path: | + /home/runner/.cache/solargraph - name: Configure to use plugins run: | bundle exec solargraph config @@ -69,6 +80,17 @@ jobs: run: | bundle exec solargraph config yq -yi '.plugins += ["solargraph-rails"]' .solargraph.yml + - name: Cache gem annotations + id: dot-cache-restore + uses: actions/cache@v4 + with: + key: | + 2025-06-26-09-${{ runner.os }}-dot-cache-${{ hashFiles('Gemfile.lock') }} + restore-keys: | + 2025-06-26-09-${{ runner.os }}-dot-cache + 2025-06-26-09-${{ runner.os }}-dot-cache- + path: | + /home/runner/.cache/solargraph - name: Install gem types run: bundle exec rbs collection update - name: Ensure typechecking still works @@ -98,6 +120,17 @@ jobs: run: | bundle exec solargraph config yq -yi '.plugins += ["solargraph-rspec"]' .solargraph.yml + - name: Cache gem annotations + id: dot-cache-restore + uses: actions/cache@v4 + with: + key: | + 2025-06-26-09-${{ runner.os }}-dot-cache-${{ hashFiles('Gemfile.lock') }} + restore-keys: | + 2025-06-26-09-${{ runner.os }}-dot-cache + 2025-06-26-09-${{ runner.os }}-dot-cache- + path: | + /home/runner/.cache/solargraph - name: Install gem types run: bundle exec rbs collection update - name: Ensure typechecking still works @@ -149,6 +182,17 @@ jobs: bundler: latest env: MATRIX_RAILS_VERSION: "7.0" + - name: Cache gem annotations + id: dot-cache-restore + uses: actions/cache@v4 + with: + key: | + 2025-06-26-09-${{ runner.os }}-dot-cache-${{ hashFiles('Gemfile.lock') }} + restore-keys: | + 2025-06-26-09-${{ runner.os }}-dot-cache + 2025-06-26-09-${{ runner.os }}-dot-cache- + path: | + /home/runner/.cache/solargraph - name: Install gems run: | set -x diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index 0ae8a3d8a..66d4abe4c 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -33,6 +33,17 @@ jobs: run: | bundle install bundle update rbs # use latest available for this Ruby version + - name: Cache gem annotations + id: dot-cache-restore + uses: actions/cache@v4 + with: + key: | + 2025-06-26-09-${{ runner.os }}-dot-cache-${{ hashFiles('Gemfile.lock') }} + restore-keys: | + 2025-06-26-09-${{ runner.os }}-dot-cache + 2025-06-26-09-${{ runner.os }}-dot-cache- + path: | + /home/runner/.cache/solargraph - name: Install gem types run: bundle exec rbs collection install - name: Typecheck self From f814d82b006ce8cf4e1498dc188956d87495da91 Mon Sep 17 00:00:00 2001 From: Vince Broz Date: Sun, 12 Oct 2025 14:14:42 -0400 Subject: [PATCH 2/7] Ensure bundles are cached --- .github/workflows/linting.yml | 7 +++++-- .github/workflows/plugins.yml | 13 +++++++++---- .github/workflows/rspec.yml | 6 ++++-- .github/workflows/typecheck.yml | 3 ++- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 0e53412cc..ed201494f 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -67,6 +67,7 @@ jobs: with: ruby-version: '3.3' bundler-cache: true + cache-version: 2025-06-06 - uses: reviewdog/action-rubocop@fcb74ba274da10b18d038d0bcddaae3518739634 # v2.21.2 with: reporter: github-pr-check @@ -87,7 +88,8 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: 3.4 - bundler-cache: false + bundler-cache: true + cache-version: 2025-06-06 - name: Install gems run: bundle install @@ -104,7 +106,8 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: 3.4 - bundler-cache: false + bundler-cache: true + cache-version: 2025-06-06 - name: Install gems run: bundle install diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index 9784806dc..2ced1beeb 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -25,6 +25,7 @@ jobs: with: ruby-version: '3.0' bundler-cache: true + cache-version: 2025-06-06 - uses: awalsh128/cache-apt-pkgs-action@latest with: packages: yq @@ -66,7 +67,8 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: '3.0' - bundler-cache: false + bundler-cache: true + cache-version: 2025-06-06 - uses: awalsh128/cache-apt-pkgs-action@latest with: packages: yq @@ -106,7 +108,8 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: '3.0' - bundler-cache: false + bundler-cache: true + cache-version: 2025-06-06 - uses: awalsh128/cache-apt-pkgs-action@latest with: packages: yq @@ -152,7 +155,8 @@ jobs: # uses: ruby/setup-ruby@v1 # with: # ruby-version: '3.0' - # bundler-cache: false + # bundler-cache: true + # cache-version: 2025-06-06 # - name: Install gems # run: | # cd ../solargraph-rspec @@ -178,7 +182,8 @@ jobs: with: # solargraph-rails supports Ruby 3.0+ ruby-version: '3.0' - bundler-cache: false + bundler-cache: true + cache-version: 2025-06-06 bundler: latest env: MATRIX_RAILS_VERSION: "7.0" diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml index ecc3d9771..4b61f70c7 100644 --- a/.github/workflows/rspec.yml +++ b/.github/workflows/rspec.yml @@ -35,7 +35,8 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} - bundler-cache: false + bundler-cache: true + cache-version: 2025-06-06 - name: Set rbs version run: echo "gem 'rbs', '${{ matrix.rbs-version }}'" >> .Gemfile # /home/runner/.rubies/ruby-head/lib/ruby/gems/3.5.0+2/gems/rbs-3.9.4/lib/rbs.rb:11: @@ -62,7 +63,8 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: '3.4' - bundler-cache: false + bundler-cache: true + cache-version: 2025-06-06 - name: Install gems run: bundle install - name: Run tests diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index 66d4abe4c..5701c708d 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -28,7 +28,8 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: 3.4 - bundler-cache: false + bundler-cache: true + cache-version: 2025-06-06 - name: Install gems run: | bundle install From aa0833a7eb580d104263a1218443e462237b1942 Mon Sep 17 00:00:00 2001 From: Vince Broz Date: Sun, 12 Oct 2025 14:17:06 -0400 Subject: [PATCH 3/7] Cache gems in rspec workflow --- .github/workflows/rspec.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml index 4b61f70c7..3ea411525 100644 --- a/.github/workflows/rspec.yml +++ b/.github/workflows/rspec.yml @@ -49,6 +49,17 @@ jobs: run: | bundle install bundle update rbs # use latest available for this Ruby version + - name: Cache gem annotations + id: dot-cache-restore + uses: actions/cache@v4 + with: + key: | + 2025-06-26-09-${{ runner.os }}-dot-cache-${{ hashFiles('Gemfile.lock') }} + restore-keys: | + 2025-06-26-09-${{ runner.os }}-dot-cache + 2025-06-26-09-${{ runner.os }}-dot-cache- + path: | + /home/runner/.cache/solargraph - name: Run tests run: bundle exec rake spec undercover: From 333d732b05ab06955ed2446cd22073af195f12bf Mon Sep 17 00:00:00 2001 From: Vince Broz Date: Sun, 12 Oct 2025 14:34:26 -0400 Subject: [PATCH 4/7] Deal with failing workflow --- .github/workflows/plugins.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index 2ced1beeb..64a0a7b88 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -67,7 +67,7 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: '3.0' - bundler-cache: true + bundler-cache: false cache-version: 2025-06-06 - uses: awalsh128/cache-apt-pkgs-action@latest with: @@ -108,7 +108,7 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: '3.0' - bundler-cache: true + bundler-cache: false cache-version: 2025-06-06 - uses: awalsh128/cache-apt-pkgs-action@latest with: From c2d94907f14ddd909fad2302e4bd1a5ba312c819 Mon Sep 17 00:00:00 2001 From: Vince Broz Date: Sun, 12 Oct 2025 14:56:20 -0400 Subject: [PATCH 5/7] Bump cache --- .github/workflows/plugins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index 64a0a7b88..fbaf26aa9 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -68,7 +68,7 @@ jobs: with: ruby-version: '3.0' bundler-cache: false - cache-version: 2025-06-06 + cache-version: 2025-10-12 - uses: awalsh128/cache-apt-pkgs-action@latest with: packages: yq From a792996a21cba7c4c8d5b9a019dc87fd919bab75 Mon Sep 17 00:00:00 2001 From: Vince Broz Date: Sun, 12 Oct 2025 14:58:50 -0400 Subject: [PATCH 6/7] Drop 'latest' config --- .github/workflows/plugins.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index fbaf26aa9..fd6a4e094 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -68,7 +68,7 @@ jobs: with: ruby-version: '3.0' bundler-cache: false - cache-version: 2025-10-12 + cache-version: 2025-06-06 - uses: awalsh128/cache-apt-pkgs-action@latest with: packages: yq @@ -182,9 +182,8 @@ jobs: with: # solargraph-rails supports Ruby 3.0+ ruby-version: '3.0' - bundler-cache: true + bundler-cache: false cache-version: 2025-06-06 - bundler: latest env: MATRIX_RAILS_VERSION: "7.0" - name: Cache gem annotations From 38e49d94e8c139cd1d2b9a31d6c8e290ea88ed6c Mon Sep 17 00:00:00 2001 From: Vince Broz Date: Sun, 12 Oct 2025 15:05:49 -0400 Subject: [PATCH 7/7] Move back to latest bundler --- .github/workflows/plugins.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index fd6a4e094..26ed16523 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -184,6 +184,7 @@ jobs: ruby-version: '3.0' bundler-cache: false cache-version: 2025-06-06 + bundler: latest env: MATRIX_RAILS_VERSION: "7.0" - name: Cache gem annotations