Skip to content

Development (#1679) #5381

Development (#1679)

Development (#1679) #5381

Workflow file for this run

name: Ruby
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
- name: Update packages
run: sudo apt update
- name: Install OS Package Dependencies
uses: mstksg/get-package@v1
with:
apt-get: libpq-dev libmagic-dev
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Install Bundler
run: gem install bundler
- name: Bundle install
run: |
bundle config set without 'rubocop production'
bundle install --jobs 4 --retry 3
- name: Setup Database
run: |
cp config/database.yml.github-actions config/database.yml
bundle exec rails db:create
bundle exec rails db:schema:load
env:
RAILS_ENV: test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
- name: Setup node
uses: actions/setup-node@v4.1.0
with:
node-version: '22'
cache: 'npm'
- name: Run npm (similar to install but made for CI)
run: bundle exec rails npm:ci
env:
RAILS_ENV: test
- name: Run npm build
run: bundle exec rails npm:build
env:
RAILS_ENV: test
- name: Run RSpec
run: bundle exec rails spec SPEC_OPTS='--tag ~skip_on_ci'
env:
RAILS_ENV: test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres