.github/workflows/ci.yml
---
name: CI
on:
- push
- pull_request
jobs:
rspec:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
ruby:
- '2.7'
- '3.0'
- '3.1'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Setup Ruby cache
uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ matrix.ruby }}-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-${{ matrix.ruby }}-
- name: Bundle
run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: RSpec & publish code coverage
uses: paambaati/codeclimate-action@v2.7.5
env:
CC_TEST_REPORTER_ID: 3dfc7b128d751fb7905e3fc1b919d81b9203ef295341ea324305fac22a8be8bc
with:
coverageCommand: bin/rake