Skip to content

fix gemfile

fix gemfile #1433

Workflow file for this run

name: Rails
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest
env:
PGHOST: localhost
POSTGRES_DB: skills_test
POSTGRES_USER: skills
POSTGRES_PASSWORD: skills
services:
postgres:
image: postgres:16
ports: ["5432:5432"]
env:
POSTGRES_DB: ${{ env.POSTGRES_DB }}
POSTGRES_USER: ${{ env.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: 'Run database migrations'
env:
RAILS_ENV: test
PGHOST: ${{ env.PGHOST }}
POSTGRES_DB: ${{ env.POSTGRES_DB }}
POSTGRES_USER: ${{ env.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
run: |
bundle exec rake db:create db:migrate
- name: 'Run tests'
env:
PGHOST: ${{ env.PGHOST }}
POSTGRES_DB: ${{ env.POSTGRES_DB }}
POSTGRES_USER: ${{ env.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
IS_CI: true
run: bundle exec rake
- name: 'Run RuboCop'
run: bundle exec rubocop --parallel