Skip to content

Merge pull request #1279 from railsbridge/mx/fix-ci #1

Merge pull request #1279 from railsbridge/mx/fix-ci

Merge pull request #1279 from railsbridge/mx/fix-ci #1

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
env:
RAILS_ENV: test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
strategy:
fail-fast: false
matrix:
database: [sqlite, postgres]
services:
postgres:
image: postgres
env:
POSTGRES_USER: ${{ env.POSTGRES_USER }}
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: Use postgres?
if: ${{ matrix.database == 'postgres' }}
run: echo "FORCE_POSTGRES=1" >> $GITHUB_ENV
- name: Set up Ruby
uses: ruby/setup-ruby@v1.133.0
with:
bundler-cache: true
cache-version: ${{ matrix.database }}
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '12'
cache: 'yarn'
- run: yarn install --frozen-lockfile # optional, --immutable
- name: Set up Google Chrome
uses: browser-actions/setup-chrome@latest
with:
chrome-version: stable
- run: chrome --version
- run: bin/rails db:setup
- run: bin/rake parallel:setup
- run: bin/rake