demarches-normaliennes/.github/actions/ci-setup-rails/action.yml

36 lines
773 B
YAML
Raw Normal View History

name: 'Setup Rails app'
description: 'Setup the environment for running the Rails app'
runs:
using: composite
steps:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
2024-01-08 15:58:04 +01:00
- name: Check YJIT support
run: |
ruby --yjit -v
shell: bash
2024-03-13 11:06:24 +01:00
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Install Node modules
2022-02-23 13:43:49 +01:00
run: |
2024-03-13 11:06:24 +01:00
bun --version
bun install
shell: bash
- name: Setup environment variables
run: cp config/env.example .env
shell: bash
- name: Setup test database
env:
RAILS_ENV: test
DATABASE_URL: "postgres://tps_test@localhost:5432/tps_test"
run: bin/rails db:create db:schema:load db:migrate
shell: bash