2021-10-26 16:58:48 +02:00
|
|
|
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: Setup Node
|
2022-10-20 11:55:10 +02:00
|
|
|
uses: actions/setup-node@v3
|
2021-10-26 16:58:48 +02:00
|
|
|
with:
|
2023-07-25 15:44:31 +02:00
|
|
|
node-version-file: '.node-version'
|
|
|
|
|
|
|
|
- name: Install yarn
|
|
|
|
run: |
|
|
|
|
npm install --global yarn
|
|
|
|
shell: bash
|
2021-10-26 16:58:48 +02:00
|
|
|
|
|
|
|
- name: Install Node modules
|
2022-02-23 13:43:49 +01:00
|
|
|
run: |
|
|
|
|
node --version
|
|
|
|
yarn install --frozen-lockfile
|
2021-10-26 16:58:48 +02:00
|
|
|
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
|