Bump backend gems (pre rails 7.1 upgrade) #148
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: CI | |
on: | |
pull_request: | |
types: | |
- opened | |
- edited | |
- synchronize | |
- reopened | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
Lint: | |
runs-on: ubuntu-latest | |
env: | |
RAILS_ENV: test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Ruby and install gems | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Lint | |
run: bin/rails standard | |
Test: | |
runs-on: ubuntu-latest | |
env: | |
RAILS_ENV: test | |
services: | |
db: | |
image: postgres:11 | |
env: | |
POSTGRES_DB: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
ports: ['5432:5432'] | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Ruby and install gems | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Setup database | |
env: | |
DATABASE_URL: postgres://postgres:postgres@localhost:5432/test | |
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} | |
run: bin/rails db:setup | |
- name: Test | |
env: | |
DATABASE_URL: postgres://postgres:postgres@localhost:5432/test | |
run: | | |
bin/rails test:prepare | |
bin/rails test |