Skip to content

Prepare for release 0.2 #15

Prepare for release 0.2

Prepare for release 0.2 #15

Workflow file for this run

name: CI
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby-version:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
- '3.3'
- '3.4'
activesupport-version:
- '~> 6.1.0'
- '~> 7.0.0'
- '~> 7.1.0'
- '~> 7.2.0'
exclude:
# ActiveSupport 7.1+ requires Ruby 3.1+
- ruby-version: '2.7'
activesupport-version: '~> 7.1.0'
- ruby-version: '3.0'
activesupport-version: '~> 7.1.0'
- ruby-version: '2.7'
activesupport-version: '~> 7.2.0'
- ruby-version: '3.0'
activesupport-version: '~> 7.2.0'
env:
ACTIVESUPPORT_VERSION: ${{ matrix.activesupport-version }}
steps:
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: false
- name: Create Gemfile for testing
run: |
cat > Gemfile.ci << EOF
source 'https://rubygems.org'
gemspec
gem 'activesupport', '${{ matrix.activesupport-version }}'
gem 'minitest', '~> 5.20'
gem 'mutex_m' if RUBY_VERSION >= '3.4'
gem 'rake'
EOF
- name: Install dependencies
run: |
cp Gemfile.ci Gemfile
bundle install
- name: Run tests
run: |
bundle exec rake test || bundle exec ruby -I test -e "Dir['test/*_test.rb'].each { |f| require f }"
- name: Run individual test files (fallback)
if: failure()
run: |
find test -name "*_test.rb" -exec bundle exec ruby {} \;
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
- name: Install RuboCop
run: |
gem install rubocop rubocop-minitest
- name: Run RuboCop
run: |
rubocop --format github || true # Don't fail on style issues for now