Skip to content

Add support for Rails 6 and 7, drop support for Rails 5 #5

Add support for Rails 6 and 7, drop support for Rails 5

Add support for Rails 6 and 7, drop support for Rails 5 #5

Workflow file for this run

name: Tests
on:
pull_request:
branches:
- '*'
push:
branches:
- main
workflow_call:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['3.0', '3.1', '3.2', '3.3']
gemfile:
- rails_6.0
- rails_6.1
- rails_7.0
- rails_7.1
# Example for excluding a specific Ruby version with a specific Gemfile
# exclude:
# - ruby: '3.0'
# gemfile: 'rails_7.1'
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
BUNDLE_PATH_RELATIVE_TO_CWD: true
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler: default
bundler-cache: true
rubygems: latest
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: yarn
cache-dependency-path: './test/sample/yarn.lock'
- name: Node version
run: |
node --version
- name: Install NPM packages for sample app
run: |
bundle exec rake app:yarn_install_frozen
- name: StandardRb check
run: bundle exec standardrb
- name: Run tests
run: |
bundle exec rake test