ci: split actions into several sub-actions
This commit is contained in:
parent
641f0df712
commit
184bf38bb2
3 changed files with 119 additions and 78 deletions
37
.github/actions/ci-setup-rails/action.yml
vendored
Normal file
37
.github/actions/ci-setup-rails/action.yml
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
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
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Install Node modules
|
||||
run: 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
|
||||
|
||||
- name: Setup split_tests binary
|
||||
run: |
|
||||
curl --no-progress-meter -L https://github.com/leonid-shevtsov/split_tests/releases/download/v0.3.0/split_tests.linux.gz | gunzip -c > split_tests
|
||||
chmod +x split_tests
|
||||
shell: bash
|
Loading…
Add table
Add a link
Reference in a new issue