.github/workflows/ci.yml
name: Continuous Integration
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
name: Rspec and Rubocop
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.0.4', '3.1.2','3.2.0']
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1.151.0
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Rubocop
env:
RAILS_ENV: test
run: |
bundle exec rubocop
- name: Minitest
env:
RAILS_ENV: test
run: |
bundle exec rake test