Skip to content

Add GitHub CI

Add GitHub CI #7

Workflow file for this run

name: CI
"on":
push:
branches:
- main
pull_request:
branches: "*"
jobs:
build:
name: Ruby ${{ matrix.ruby }}, Rails ${{ matrix.rails }}
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3"]
rails: ["6.1", "7.0", "7.1", "main"]
continue-on-error: [false]
env:
RAILS_VERSION: ${{ matrix.rails }}
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Generate lockfile
run: bundle lock
- name: Cache dependencies
uses: actions/cache@v3
with:
path: vendor/bundle
key: bundle-${{ hashFiles('Gemfile.lock') }}
- run: bundle check || bundle install
- name: Run rspec tests
run: bundle exec rspec
continue-on-error: ${{ matrix.continue-on-error }}