diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index b4ef26bfe..ed201494f 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') }} @@ -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 b5984f3cb..26ed16523 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 @@ -35,6 +36,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 @@ -56,6 +68,7 @@ jobs: with: ruby-version: '3.0' bundler-cache: false + cache-version: 2025-06-06 - uses: awalsh128/cache-apt-pkgs-action@latest with: packages: yq @@ -69,6 +82,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 @@ -85,6 +109,7 @@ jobs: with: ruby-version: '3.0' bundler-cache: false + cache-version: 2025-06-06 - uses: awalsh128/cache-apt-pkgs-action@latest with: packages: yq @@ -98,6 +123,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 @@ -119,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 @@ -146,9 +183,21 @@ jobs: # solargraph-rails supports Ruby 3.0+ ruby-version: '3.0' bundler-cache: false + cache-version: 2025-06-06 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/rspec.yml b/.github/workflows/rspec.yml index ecc3d9771..3ea411525 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: @@ -48,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: @@ -62,7 +74,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 0ae8a3d8a..5701c708d 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -28,11 +28,23 @@ 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 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