Merge pull request #198 from kachick/bump-runner-to-ubuntu-2404 #222
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://docs.github.com/ja/actions/reference/workflow-syntax-for-github-actions | |
name: Spec | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/spec.yml' | |
- '.ruby-version' | |
- '**.gemspec' | |
- 'Gemfile' | |
- 'Rakefile' | |
- '**.rb' | |
pull_request: | |
paths: | |
- '.github/workflows/spec.yml' | |
- '.ruby-version' | |
- '**.gemspec' | |
- 'Gemfile' | |
- 'Rakefile' | |
- '**.rb' | |
jobs: | |
rspec: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-24.04] | |
ruby: ['head', '3.3', '3.2'] | |
gemfile: ['Gemfile', 'gemfiles/oldest.gemfile'] | |
runs-on: ${{ matrix.os }} | |
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps | |
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }} | |
steps: | |
- name: Install libyaml | |
if: startsWith(matrix.os, 'ubuntu-') && matrix.ruby == '3.2' | |
run: sudo apt-get install --no-install-recommends --assume-yes libyaml-dev | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
env: | |
# https://github.com/kachick/irb-power_assert/blob/104834846baf5caa1e8536a11c43acdd56fc849c/CONTRIBUTING.md#adding-dependencies-for-this-gem | |
BUNDLE_WITHOUT: development | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- run: bundle exec rake spec | |
env: | |
BUNDLE_WITHOUT: development |