Add Rails 7.2 support #87
Workflow file for this run
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: CI | |
on: | |
pull_request: | |
branches: | |
- '*' | |
push: | |
branches: | |
- master | |
jobs: | |
# SQLITE | |
sqlite: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: ['2.6', '2.7', '3.0', '3.1', '3.2'] | |
gemfile: | |
- rails_5_2 | |
- rails_6_0 | |
- rails_6_1 | |
- rails_7_0 | |
- rails_7_1 | |
- rails_7_2 | |
- rails_main | |
exclude: | |
- ruby: '3.2' | |
gemfile: rails_6_0 | |
- ruby: '3.2' | |
gemfile: rails_5_2 | |
- ruby: '3.1' | |
gemfile: rails_5_2 | |
- ruby: '3.0' | |
gemfile: rails_5_2 | |
# Rails 7.2 requires Ruby 3.1 or higher | |
- ruby: '2.6' | |
gemfile: rails_main | |
- ruby: '2.7' | |
gemfile: rails_main | |
- ruby: '3.0' | |
gemfile: rails_main | |
- ruby: '2.6' | |
gemfile: rails_7_0 | |
- ruby: '2.6' | |
gemfile: rails_7_1 | |
- ruby: '2.6' | |
gemfile: rails_7_2 | |
- ruby: '2.7' | |
gemfile: rails_7_2 | |
- ruby: '3.0' | |
gemfile: rails_7_2 | |
env: | |
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile | |
BUNDLE_PATH_RELATIVE_TO_CWD: true | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby ${{ matrix.ruby }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Run tests | |
env: | |
RAILS_ENV: test | |
run: | | |
bundle exec rspec spec | |
# MYSQL | |
mysql: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: ['2.6', '2.7', '3.0', '3.1'] | |
gemfile: | |
- rails_5_2 | |
- rails_6_0 | |
- rails_6_1 | |
- rails_7_0 | |
- rails_7_1 | |
- rails_7_2 | |
- rails_main | |
exclude: | |
- ruby: '3.2' | |
gemfile: rails_6_0 | |
- ruby: '3.2' | |
gemfile: rails_5_2 | |
- ruby: '3.1' | |
gemfile: rails_5_2 | |
- ruby: '3.0' | |
gemfile: rails_5_2 | |
# Rails 8 requires Ruby 3.1 or higher | |
- ruby: '2.6' | |
gemfile: rails_main | |
- ruby: '2.7' | |
gemfile: rails_main | |
- ruby: '3.0' | |
gemfile: rails_main | |
- ruby: '2.6' | |
gemfile: rails_7_0 | |
- ruby: '2.6' | |
gemfile: rails_7_1 | |
- ruby: '2.6' | |
gemfile: rails_7_2 | |
- ruby: '2.7' | |
gemfile: rails_7_2 | |
- ruby: '3.0' | |
gemfile: rails_7_2 | |
env: | |
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile | |
BUNDLE_PATH_RELATIVE_TO_CWD: true | |
services: | |
mysql: | |
image: mysql:8 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
MSQL_DATABASE: awesome_nested_set_plugin_test | |
ports: ['3306:3306'] | |
options: >- | |
--health-cmd="mysqladmin ping" | |
--health-interval=10s | |
--health-timeout=5s | |
--health-retries=3 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby ${{ matrix.ruby }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Run tests | |
env: | |
DATABASE_URL: mysql2://root@127.0.0.1:3306/awesome_nested_set_plugin_test | |
RAILS_ENV: test | |
DB: mysql | |
run: | | |
bundle exec rspec spec | |
# POSTGRES | |
postgres: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: ['2.6', '2.7', '3.0', '3.1', '3.2'] | |
gemfile: | |
- rails_5_2 | |
- rails_6_0 | |
- rails_6_1 | |
- rails_7_0 | |
- rails_7_1 | |
- rails_7_2 | |
- rails_main | |
exclude: | |
- ruby: '3.2' | |
gemfile: rails_6_0 | |
- ruby: '3.2' | |
gemfile: rails_5_2 | |
- ruby: '3.1' | |
gemfile: rails_5_2 | |
- ruby: '3.0' | |
gemfile: rails_5_2 | |
# Rails 8 requires Ruby 3.1 or higher | |
- ruby: '2.6' | |
gemfile: rails_main | |
- ruby: '2.7' | |
gemfile: rails_main | |
- ruby: '3.0' | |
gemfile: rails_main | |
- ruby: '2.6' | |
gemfile: rails_7_0 | |
- ruby: '2.6' | |
gemfile: rails_7_1 | |
- ruby: '2.6' | |
gemfile: rails_7_2 | |
- ruby: '2.7' | |
gemfile: rails_7_2 | |
- ruby: '3.0' | |
gemfile: rails_7_2 | |
env: | |
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile | |
BUNDLE_PATH_RELATIVE_TO_CWD: true | |
services: | |
postgres: | |
image: postgres:12 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: awesome_nested_set_plugin_test | |
ports: ['5432:5432'] | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby ${{ matrix.ruby }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Run tests | |
env: | |
DATABASE_URL: postgres://postgres:postgres@127.0.0.1:5432/awesome_nested_set_plugin_test | |
RAILS_ENV: test | |
DB: postgresql | |
run: | | |
bundle exec rspec spec |