f #81
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: Test | |
on: [push] | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.experimental }} | |
strategy: | |
fail-fast: false | |
matrix: | |
rails: [52, 60, 61, 70] | |
ruby: [2.7, '3.0', 3.1, 3.2] | |
experimental: [false] | |
exclude: | |
- ruby: 3.0 | |
rails: 52 | |
- ruby: 3.1 | |
rails: 52 | |
- ruby: 3.2 | |
rails: 52 | |
include: | |
- rails: head | |
ruby: '3.0' | |
experimental: true | |
- rails: head | |
ruby: 3.1 | |
experimental: true | |
- rails: head | |
ruby: 3.2 | |
experimental: true | |
services: | |
postgres: | |
image: postgres:12 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
ports: ["5432:5432"] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
- uses: actions/cache@v2 | |
with: | |
path: vendor/bundle | |
key: bundle-use-ruby-${{ matrix.ruby }}-${{ matrix.rails }}-${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: | | |
bundle-use-ruby-${{ matrix.ruby }}-${{ matrix.rails }}- | |
- name: Bundle install | |
run: | | |
bundle config path vendor/bundle | |
bundle config set --local gemfile gemfiles/activerecord-${{ matrix.rails }}.gemfile | |
bundle install --jobs 4 --retry 3 | |
- name: Setup Database | |
env: | |
DATABASE_NAME: active_record_extended_test | |
DATABASE_URL: postgres://postgres:postgres@localhost:5432/active_record_extended_test | |
run: | | |
bundle exec rake db:setup | |
- name: Run tests | |
env: | |
DATABASE_NAME: active_record_extended_test | |
DATABASE_URL: postgres://postgres:postgres@localhost:5432/active_record_extended_test | |
run: bundle exec rake |