From f18ce34a99e31edcf1e193ae0569008606556428 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Thu, 27 Jun 2024 13:49:07 -0700 Subject: [PATCH] Use bundler-cache to speed up CI See puppetlabs/puppet@86820eee25e428f7e667bf9529b97c32e6575d9b This intentionally doesn't use bundler-cache for the mend workflow, since we want the latest versions of all of our dependencies that still satisfy our constraints. This doesn't update the acceptance_tests workflow because it does a bundle install for both the top-level Gemfile and the one in the acceptance dir. --- .github/workflows/checks.yaml | 2 +- .github/workflows/coverage.yaml | 2 +- .github/workflows/integration_tests.yaml | 6 +++--- .github/workflows/unit_tests.yaml | 6 ++---- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 54ce3d0a07..8cc88f0f4c 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -21,6 +21,6 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: '2.7' - - run: bundle install --jobs 3 --retry 3 + bundler-cache: true - run: bundle exec rubocop --parallel diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index c394342d62..a45634fc60 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -24,7 +24,7 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: '2.7' - - run: bundle install --jobs 3 --retry 3 + bundler-cache: true - run: bundle exec rake spec - name: Publish code coverage diff --git a/.github/workflows/integration_tests.yaml b/.github/workflows/integration_tests.yaml index cf3fa6237b..fc2324ed65 100644 --- a/.github/workflows/integration_tests.yaml +++ b/.github/workflows/integration_tests.yaml @@ -24,6 +24,8 @@ jobs: - {os: windows-2019, ruby: '2.7'} - {os: windows-2019, ruby: '3.2'} # with openssl 3 runs-on: ${{ matrix.cfg.os }} + env: + BUNDLE_SET: 'with integration' steps: - name: Checkout current PR uses: actions/checkout@v4 @@ -32,7 +34,5 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.cfg.ruby }} - - run: gem update bundler - - run: bundle config set --local with integration - - run: bundle install --jobs 3 --retry 3 + bundler-cache: true - run: bundle exec rake spec_integration diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index e37b9a4dfe..5d9100be9f 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -33,8 +33,7 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - - run: gem update bundler - - run: bundle install --jobs 3 --retry 3 + bundler-cache: true - run: bundle exec rake spec_random windows_unit_tests: @@ -53,6 +52,5 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - - run: gem update bundler - - run: bundle install --jobs 3 --retry 3 + bundler-cache: true - run: bundle exec rake spec_random