From 69c132723ff7cf1c338709ac658b919c9f984125 Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Thu, 28 Mar 2024 09:20:26 +0800 Subject: [PATCH] DEV: Update actions cache keys for bundler and app cache (#26398) Why this change? Bundle cache should be keyed on ruby version as well as the debian release name. Changes to the debian release can affect the way gems are installed since gems may link to different versions of binaries. --- .github/workflows/tests.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1aa532b5d3c..182796b7dce 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,7 +24,7 @@ jobs: if: github.event_name == 'pull_request' || github.repository != 'discourse/discourse-private-mirror' name: ${{ matrix.target }} ${{ matrix.build_type }} # Update fetch-job-id step if changing this runs-on: ${{ (matrix.build_type == 'annotations') && 'ubuntu-latest' || 'ubuntu-20.04-8core' }} - container: discourse/discourse_test:slim${{ (matrix.build_type == 'frontend' || matrix.build_type == 'system') && '-browsers' || '' }}${{ (matrix.ruby == '3.1') && '-ruby-3.1.0' || '' }} + container: discourse/discourse_test:slim${{ (matrix.build_type == 'frontend' || matrix.build_type == 'system') && '-browsers' || '' }} timeout-minutes: 20 env: @@ -43,7 +43,6 @@ jobs: matrix: build_type: [backend, frontend, system, annotations] target: [core, plugins, themes] - ruby: ["3.2"] exclude: - build_type: annotations target: plugins @@ -89,7 +88,7 @@ jobs: uses: actions/cache@v4 with: path: vendor/bundle - key: ${{ runner.os }}-${{ matrix.ruby }}-gem-${{ hashFiles('**/Gemfile.lock') }}-cachev2 + key: ${{ runner.os }}-${{ env.RUBY_VERSION }}-${{ env.DEBIAN_RELEASE }}-gem-${{ hashFiles('**/Gemfile.lock') }}-cachev2 - name: Setup gems run: |