Skip to content

Merge pull request #1361 from Lykos/dependabot/npm_and_yarn/typescrip… #4468

Merge pull request #1361 from Lykos/dependabot/npm_and_yarn/typescrip…

Merge pull request #1361 from Lykos/dependabot/npm_and_yarn/typescrip… #4468

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: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Update packages
run: sudo apt update
- name: Install OS Package Dependencies
uses: mstksg/get-package@v1
with:
apt-get: libpq-dev
- 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.0.2
with:
node-version: '20'
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