Skip to content

dry up CI

dry up CI #17

Workflow file for this run

name: test
on:
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
permissions:
contents: read
jobs:
test:
name: Ruby ${{ matrix.ruby }}, ${{ matrix.gemfile }}.gemfile, PG ${{ matrix.postgres }}
runs-on: ubuntu-latest
services:
test-postgres:
image: postgres:${{ matrix.postgres }}
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: foobar123
strategy:
matrix:
# old
- { gemfile: 'rails_7.1', ruby: '3.3', postgres: '15' }

Check failure on line 29 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / test

Invalid workflow file

The workflow is not valid. .github/workflows/test.yml (Line: 29, Col: 7): A sequence was not expected
- { gemfile: 'rails_7.1', ruby: '3.3', postgres: '16' }
# current
- { gemfile: 'rails_7.2', ruby: '3.3', postgres: '16' }
- { gemfile: 'rails_7.2', ruby: '3.3', postgres: '17' }
# modern
- { gemfile: 'rails_8.0', ruby: '3.3', postgres: '16' }
- { gemfile: 'rails_8.0', ruby: '3.3', postgres: '17' }
# futuristic
- { gemfile: 'rails_8.0', ruby: 'head', postgres: '17' }
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
- name: Create database
run: |
createdb \
--host=$POSTGRES_HOST \
--port=$POSTGRES_PORT \
--username=postgres \
dummy
env:
PGPASSWORD: foobar123
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
- name: Run specs
run: bundle exec rake install_database_yml spec
env:
BACKTRACE: 1
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
DB: postgres
IRONTRAIL_CI_DATABASE: dummy
IRONTRAIL_CI_DB_USER: postgres
IRONTRAIL_CI_DB_PASSWORD: foobar123
IRONTRAIL_CI_DB_HOST: 127.0.0.1
IRONTRAIL_CI_DB_PORT: 5432