demarches-normaliennes/.github/actions/ci-setup-rails/action.yml
2024-01-11 13:46:04 +01:00

43 lines
942 B
YAML

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
- name: Check YJIT support
run: |
ruby --yjit -v
shell: bash
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
- name: Install yarn
run: |
npm install --global yarn
shell: bash
- name: Install Node modules
run: |
node --version
yarn install --frozen-lockfile
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