.github/workflows/main.yml
name: Ruby
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [2.5, 2.6, 2.7, 3.0]
name: Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: vendor/bundle
key: bundle-${{ hashFiles('**/Gemfile.lock') }}
- name: Set up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Install bundler
run: gem install bundler
- name: Bundle install
run: bundle install --jobs 4 --retry 3
env:
RAILS_ENV: test
- name: Run test
run: rake test
env:
RAILS_ENV: test