Get started with Rails 7.1 support #421
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: push | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:5.7 | |
ports: | |
- 3306:3306 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: "yes" | |
options: >- | |
--health-cmd "mysql -uroot -e 'show databases'" | |
--health-interval 2s | |
--health-timeout 1s | |
--health-retries 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby-version: | |
- "2.7" | |
- "3.0" | |
- "3.1" | |
- "3.2" | |
- "3.3" | |
gemfile: | |
- rails6.1 | |
- rails7.0 | |
include: | |
- {ruby-version: "2.6", gemfile: rails5.1} | |
- {ruby-version: "2.6", gemfile: rails5.2} | |
- {ruby-version: "2.6", gemfile: rails6.0} | |
- {ruby-version: "2.6", gemfile: rails6.1} | |
- {ruby-version: "2.7", gemfile: rails6.0} | |
env: | |
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true | |
- run: bundle exec rake test | |
tests_successful: | |
name: Tests passing? | |
needs: tests | |
if: always() | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
if ${{ needs.tests.result == 'success' }} | |
then | |
echo "All tests passed" | |
else | |
echo "Some tests failed" | |
false | |
fi | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.0" | |
bundler-cache: true | |
- run: bundle exec rake rubocop |