Skip to content

#128 Add Rails 8 to the test suite #103

#128 Add Rails 8 to the test suite

#128 Add Rails 8 to the test suite #103

Workflow file for this run

---
name: test
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package_manager:
- npm
- yarn
rails_version:
- "~> 8.0"
- "~> 7.2"
- "~> 7.1"
- "~> 7.0"
ruby_version:
- "3.3"
- "3.2"
- "3.1"
exclude:
- rails_version: "~> 8.0"
ruby_version: "3.1"
name: ${{ matrix.package_manager }}, Rails ${{ matrix.rails_version }}, Ruby ${{ matrix.ruby_version }}
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
- name: Install Bundler 2.4 for Ruby 2.7
if: matrix.ruby_version == '2.7'
run: gem install bundler -v 2.4
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: "22"
- name: Install rails dependencies
env:
RAILS_VERSION: ${{ matrix.rails_version }}
run: |
if [ "${{ matrix.ruby_version }}" = "2.7" ]; then
bundle _2.4_ install --jobs 4 --retry 3
else
bundle install --jobs 4 --retry 3
fi
- name: Install mjml with npm
if: ${{ matrix.package_manager == 'npm' }}
run: npm add mjml
- name: Install mjml with yarn
if: ${{ matrix.package_manager == 'yarn' }}
run: yarn add mjml
- name: Run tests
env:
RAILS_VERSION: ${{ matrix.rails_version }}
run: rake
- name: Run RuboCop
run: bundle exec rubocop