Skip to content

Merge pull request #288 from ifad/chore/use-dependent #567

Merge pull request #288 from ifad/chore/use-dependent

Merge pull request #288 from ifad/chore/use-dependent #567

Workflow file for this run

name: Ruby specs
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
test:
name: Ruby specs
runs-on: ubuntu-latest
services:
db:
image: postgres:12
ports: ['5432:5432']
env:
POSTGRES_HOST_AUTH_METHOD: trust
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
matrix:
ruby-version: ['3.0', '3.1', '3.2', '3.3']
gemfile: [rails_7.0, rails_7.1]
channel: ['stable']
include:
- ruby-version: '3.1'
gemfile: rails_edge
channel: 'experimental'
- ruby-version: '3.2'
gemfile: rails_edge
channel: 'experimental'
- ruby-version: '3.3'
gemfile: rails_edge
channel: 'experimental'
- ruby-version: 'head'
gemfile: rails_7.0
channel: 'experimental'
- ruby-version: 'head'
gemfile: rails_7.1
channel: 'experimental'
- ruby-version: 'head'
gemfile: rails_edge
channel: 'experimental'
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
TEST_CONFIG: ./spec/config.github.yml
continue-on-error: ${{ matrix.channel != 'stable' }}
steps:
- uses: actions/checkout@v4
- name: Set up Database
run: |
psql -c "CREATE ROLE runner SUPERUSER LOGIN CREATEDB;" -U postgres -h localhost
psql -c "CREATE DATABASE chronomodel;" -U postgres -h localhost
psql -c "CREATE DATABASE chronomodel_railsapp;" -U postgres -h localhost
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run specs and publish code coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: dedfb7472ee410eec459bff3681d9a8fd8dd237e9bd7e8675a7c8eb7e253bba9
with:
coverageCommand: bundle exec rake