Add support for Rails 6 and 7, drop support for Rails 5 #1
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
name: Tests | |
on: | |
pull_request: | |
branches: | |
- '*' | |
push: | |
branches: | |
- main | |
workflow_call: | |
jobs: | |
sqlite: | |
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 | |
# exclude: | |
# - ruby: '3.0' | |
# gemfile: 'rails_main' | |
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 rails db:test:prepare | |
bundle exec rails test |