Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 32 additions & 3 deletions .github/workflows/Specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
os: [ubuntu-24.04]
ruby: [2.6, 2.7, 3.0.0, 3.2.2]
include:
- os: macos-13
- os: macos-15
ruby: system

name: ${{ matrix.os }} / Ruby ${{ matrix.ruby }}
Expand All @@ -23,6 +23,26 @@ jobs:
with:
ruby-version: ${{ matrix.ruby }}

# 'system' means Apple's /usr/bin/ruby, NOT the Homebrew Ruby that the
# GitHub macOS images put first on PATH. Overwrite PATH with the stock
# system directories so none of the image's preinstalled rubies can
# shadow /usr/bin/ruby. Apple's default gem home is not writable, so
# gems go to ~/.gem (whose bin dir leads the stubbed PATH).
- name: Use Apple system Ruby
if: ${{ matrix.ruby == 'system' }}
run: |
echo "GEM_HOME=$HOME/.gem" >> $GITHUB_ENV
echo "PATH=$HOME/.gem/bin:/usr/bin:/bin:/usr/sbin:/sbin" >> $GITHUB_ENV

- name: Verify system Ruby
if: ${{ matrix.ruby == 'system' }}
run: |
ruby --version
if [ "$(which ruby)" != "/usr/bin/ruby" ]; then
echo "::error::Expected /usr/bin/ruby, got $(which ruby) ($(ruby --version))"
exit 1
fi

- name: Update git submodules
run: git submodule update --init

Expand All @@ -31,8 +51,17 @@ jobs:

- name: Run bundle install
run: |
# Match the Gemfile.lock BUNDLED WITH version; 2.3.26 supports all
# matrix Rubies (>= 2.6). For 'system', /usr/bin/gem pins the
# binstub to Apple's Ruby.
if [ "${{ matrix.ruby }}" = "system" ]; then
/usr/bin/gem install bundler -v 2.3.26
else
gem install bundler -v 2.3.26
fi
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3 --without debugging documentation
bundle config set without 'debugging documentation'
bundle install --jobs 4 --retry 3

- name: Run Specs + Rubocop
run: bundle exec rake spec
Expand Down