Skip to content

ref: rubocop

ref: rubocop #54

Workflow file for this run

name: Tests
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- '3.0.7'
- '3.2.9'
- '3.4.5'
- '2.7.8'
- '2.3.8'
- '2.5.9'
env:
BUNDLE_GEMFILE: ${{ (matrix.ruby >= '3.4' && 'Gemfile_ruby_3_4') || (matrix.ruby >= '2.7' && 'Gemfile') || (matrix.ruby >= '2.5' && 'Gemfile_ruby_2_5') || 'Gemfile_ruby_2_3' }}
steps:
- name: Dependencies
uses: daaku/gh-action-apt-install@v4
with:
packages: libyajl2 libyajl-dev valgrind
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
rubygems: ${{ (matrix.ruby >= '2.7' && '3.4.20') || '3.2.3' }}
- name: Run the default task
run: bundle exec rake
- name: Run valgrind
if: ${{ matrix.ruby >= '2.7' }}
run: bundle exec rake spec:valgrind