Skip to content

Merge pull request #7655 from rubygems/dependabot/github_actions/acti… #2440

Merge pull request #7655 from rubygems/dependabot/github_actions/acti…

Merge pull request #7655 from rubygems/dependabot/github_actions/acti… #2440

name: system-rubygems-bundler
on:
pull_request:
paths:
- bundler/**
- .github/workflows/system-rubygems-bundler.yml
push:
branches:
- master
concurrency:
group: ci-${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
defaults:
run:
shell: bash
jobs:
system_rubygems_bundler:
name: Bundler ${{ matrix.bundler.name }} against system Rubygems (${{ matrix.ruby.name }})
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- { bundler: { name: 2, value: '' }, ruby: { name: ruby-3.0, value: 3.0.7 } }
- { bundler: { name: 2, value: '' }, ruby: { name: ruby-3.1, value: 3.1.5 } }
- { bundler: { name: 2, value: '' }, ruby: { name: ruby-3.2, value: 3.2.4 } }
- { bundler: { name: 2, value: '' }, ruby: { name: ruby-3.3, value: 3.3.1 } }
- { bundler: { name: 3, value: 3.0.0 }, ruby: { name: ruby-3.0, value: 3.0.7 } }
- { bundler: { name: 3, value: 3.0.0 }, ruby: { name: ruby-3.1, value: 3.1.5 } }
- { bundler: { name: 3, value: 3.0.0 }, ruby: { name: ruby-3.2, value: 3.2.4 } }
- { bundler: { name: 3, value: 3.0.0 }, ruby: { name: ruby-3.3, value: 3.3.1 } }
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Setup ruby
uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0
with:
ruby-version: ${{ matrix.ruby.value }}
bundler: none
- name: Install graphviz
run: sudo apt-get install graphviz -y
if: matrix.bundler.value == ''
- name: Prepare dependencies
run: |
bin/rake spec:parallel_deps
- name: Replace version
run: BUNDLER_SPEC_SUB_VERSION=${{ matrix.bundler.value }} bin/rake override_version
if: matrix.bundler.value != ''
- name: Run Test
run: |
bin/parallel_rspec
working-directory: ./bundler
- name: Save system RubyGems version to ENV
run: |
RGV=$(ruby -e 'puts Gem::VERSION.split(".")[0..2].join(".")')
echo "RGV=v$RGV" >> $GITHUB_ENV
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
path: bundler/tmp/rubygems
ref: ${{ env.RGV }}
if: matrix.ruby.name != 'ruby-3.3'
- name: Run Rubygems Requirement tests against local bundler, to make sure bundler monkeypatches preserve the behaviour
run: |
ruby -I../../lib:lib:test test/rubygems/test_gem_requirement.rb
working-directory: ./bundler/tmp/rubygems
if: matrix.ruby.name != 'ruby-3.3'
timeout-minutes: 60