Skip to content

Optimize CI setup

Optimize CI setup #148

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- master
jobs:
main:
name: Ruby ${{ matrix.ruby }}
runs-on: ubuntu-latest
strategy:
matrix:
ruby:
- "2.7"
- "3.0"
- "3.1"
- "3.2"
- "3.3"
- "3.4"
- "4.0"
steps:
- uses: actions/checkout@v6
- uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.ruby }}"
bundler-cache: true
- name: RuboCop
run: bundle exec rubocop --parallel
- name: RSpec
run: bundle exec rspec
success:
name: Checks passing?
needs: main
if: always()
runs-on: ubuntu-latest
steps:
- run: |
if ${{ needs.main.result == 'success' }}
then
echo "All checks passed"
else
echo "Some checks failed"
false
fi