.github/actions/setup/action.yml
# using https://github.com/microsoft/action-python/blob/main/action.yml as an example
name: 'Rails Test Setup'
inputs:
ruby-only:
description: only setup ruby
default: false
runs:
using: composite
steps:
- if: ${{ inputs.ruby-only == 'false' }}
uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: "3.0"
- if: ${{ inputs.ruby-only == 'false' }}
run: bundle exec rails db:schema:load
shell: bash
- if: ${{ inputs.ruby-only == 'false' }}
run: bundle exec rake assets:precompile
shell: bash