Skip to content

CI

CI #291

Workflow file for this run

---
name: CI
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '15 3 * * 1'
jobs:
static-analysis:
name: 'Static analysis'
runs-on: ubuntu-24.04
timeout-minutes: 2
steps:
- uses: actions/checkout@v4
- name: 'Set up Ruby'
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.4'
bundler-cache: true
- name: 'Check the environment'
run: |
ruby --version
gem --version
bundle --version
- name: 'Run RuboCop'
run: |
bundle exec rubocop Gemfile \
gemfiles/Gemfile.rails-6.1 gemfiles/Gemfile.rails-7.0 gemfiles/Gemfile.rails-7.1 \
lib/ test/ Rakefile
test:
name: "Tests: Ruby ${{ matrix.ruby }} / Rails ${{ matrix.rails }}"
runs-on: ubuntu-24.04
timeout-minutes: 2
env:
BUNDLE_GEMFILE: "${{ github.workspace }}/gemfiles/Gemfile.rails-${{ matrix.rails }}"
steps:
- uses: actions/checkout@v4
- name: 'Set up Ruby'
uses: ruby/setup-ruby@v1
with:
ruby-version: '${{ matrix.ruby }}'
bundler-cache: true
- name: 'Check the environment'
run: |
ruby --version
gem --version
bundle --version
echo $BUNDLE_GEMFILE
- name: 'Run the tests'
run: 'bundle exec rake --trace test'
strategy:
fail-fast: false
matrix:
include:
- { 'rails': '6.1', 'ruby': '3.1.6' }
- { 'rails': '6.1', 'ruby': '3.2.5' }
- { 'rails': '6.1', 'ruby': '3.3.4' }
- { 'rails': '7.0', 'ruby': '3.1.6' }
- { 'rails': '7.0', 'ruby': '3.2.5' }
- { 'rails': '7.0', 'ruby': '3.3.4' }
- { 'rails': '7.1', 'ruby': '3.1.6' }
- { 'rails': '7.1', 'ruby': '3.2.5' }
- { 'rails': '7.1', 'ruby': '3.3.4' }