Skip to content

Workflow file for this run

name: audiences-multi
on:
push:
jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }} / ${{ matrix.gemfile }}
env:
DATABASE_USER: dbuser
DATABASE_PASS: dbpass
DATABASE_HOST: 127.0.0.1
strategy:
fail-fast: false
matrix:
ruby:
- 3.0
- 3.1
- 3.2
- 3.3
gemfile:
- gemfiles/rails_6_1.gemfile
- gemfiles/rails_7_0.gemfile
- gemfiles/rails_7_1.gemfile
exclude:
- ruby: 3.2
gemfile: gemfiles/rails_6_1.gemfile
- ruby: 3.3
gemfile: gemfiles/rails_6_1.gemfile
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: ${{ env.DATABASE_USER }}
POSTGRES_PASSWORD: ${{ env.DATABASE_PASS }}
POSTGRES_DB: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
mysql:
image: mysql:latest
env:
MYSQL_USER: ${{ env.DATABASE_USER }}
MYSQL_PASSWORD: ${{ env.DATABASE_PASS }}
MYSQL_RANDOM_ROOT_PASSWORD: yes
MYSQL_DATABASE: test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v3
- name: Install non-ruby dependencies
run: sudo apt-get install libpq-dev
- name: 'postgresql adapter'
uses: powerhome/github-actions-workflows/ruby-gem@rubygem-action
env:
DATABASE_ADAPTER: postgresql
DATABASE_PORT: 5432
with:
workdir: audiences
ruby: ${{ matrix.ruby }}
gemfile: ${{ matrix.gemfile }}
- name: 'mysql2 adapter'
uses: powerhome/github-actions-workflows/ruby-gem@rubygem-action
env:
DATABASE_ADAPTER: mysql2
DATABASE_PORT: 3306
with:
workdir: audiences
ruby: ${{ matrix.ruby }}
gemfile: ${{ matrix.gemfile }}