[CI] Bump ruby versions to latest stable 3.x (#8) #38
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: checks | |
on: [push, pull_request] | |
jobs: | |
checks: | |
env: | |
DATABASE_URL: postgres://postgres:postgres@localhost:5432 | |
DISABLE_BOOTSNAP: true | |
DISABLE_BOOTSNAP_LOAD_PATH_CACHE: true | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
RAILS_ENV: test | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# Technically no longer maintained Ruby releases, but lets still test them: | |
- ruby-version: "2.6.10" | |
rails-version: "4.2" | |
- ruby-version: "2.7.8" | |
rails-version: "5.2" | |
- ruby-version: "2.7.8" | |
rails-version: "6.1" | |
- ruby-version: "2.7.8" | |
rails-version: "7.0" | |
# Security maintenance releases: | |
- ruby-version: "3.1.5" | |
rails-version: "7.0" | |
# Stable releases: | |
- ruby-version: "3.2.4" | |
rails-version: "7.1" | |
- ruby-version: "3.3.3" | |
rails-version: "7.1" | |
services: | |
postgres: | |
image: postgres:15 | |
env: | |
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }} | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby ${{ matrix.ruby-version }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
# bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Using Rails version ${{ matrix.rails-version }} | |
run: bundle install --gemfile=spec/support/Gemfile-rails-${{ matrix.rails-version }} | |
# - name: Lint | |
# run: bundle exec rubocop | |
- name: Run tests | |
run: bundle exec rspec |