Skip to content

Add backwards compatibility to Ruby 2.6 (#562) #260

Add backwards compatibility to Ruby 2.6 (#562)

Add backwards compatibility to Ruby 2.6 (#562) #260

Workflow file for this run

name: Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
types:
- opened
- synchronize
- reopened
- ready_for_review
- labeled
- unlabeled
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: read-version
run: |
echo "::set-output name=VERSION::`cat lib/ice_cube/version.rb | grep -i version | awk '{ print $3 }' | sed -e 's/\"//g'`"
- uses: dangoslen/changelog-enforcer@v3
with:
skipLabels: 'skip-changelog'
expectedLatestVersion: ${{ steps.read-version.outputs.VERSION }}
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
bundler-cache: true
- run: bundle exec standardrb
test:
needs:
- changelog
- lint
strategy:
matrix:
rails: ['6.1', '7.0', '7.1', '7.2', '8.0', '8.1']
ruby: ['2.6', '2.7', '3.0', '3.1', '3.2', '3.3', '3.4', '4.0']
exclude:
# Rails 6.1: Only supports Ruby 2.6-3.0
- rails: '6.1'
ruby: '3.1'
- rails: '6.1'
ruby: '3.2'
- rails: '6.1'
ruby: '3.3'
- rails: '6.1'
ruby: '3.4'
- rails: '6.1'
ruby: '4.0'
# Rails 7.0 & 7.1: Require Ruby 2.7+, tested up to 3.3
- rails: '7.0'
ruby: '2.6'
- rails: '7.0'
ruby: '3.4'
- rails: '7.0'
ruby: '4.0'
- rails: '7.1'
ruby: '2.6'
- rails: '7.1'
ruby: '3.4'
- rails: '7.1'
ruby: '4.0'
# Rails 7.2: Requires Ruby 3.1+
- rails: '7.2'
ruby: '2.6'
- rails: '7.2'
ruby: '2.7'
- rails: '7.2'
ruby: '3.0'
# Rails 8.0 & 8.1: Require Ruby 3.2+
- rails: '8.0'
ruby: '2.6'
- rails: '8.0'
ruby: '2.7'
- rails: '8.0'
ruby: '3.0'
- rails: '8.0'
ruby: '3.1'
- rails: '8.1'
ruby: '2.6'
- rails: '8.1'
ruby: '2.7'
- rails: '8.1'
ruby: '3.0'
- rails: '8.1'
ruby: '3.1'
runs-on: ubuntu-latest
env:
RAILS_VERSION: ${{ matrix.rails }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake