Skip to content

💎

💎 #98

Workflow file for this run

# https://docs.github.com/ja/actions/reference/workflow-syntax-for-github-actions
name: CI - Ruby
on:
push:
branches:
- main
paths:
- '.github/workflows/ci-ruby.yml'
- '.ruby-version'
- '**.gemspec'
- 'Gemfile'
- 'Rakefile'
- '**.rb'
pull_request:
paths:
- '.github/workflows/ci-ruby.yml'
- '.ruby-version'
- '**.gemspec'
- 'Gemfile'
- 'Rakefile'
- '**.rb'
schedule:
# Every 10:42 JST
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
- cron: '42 1 * * *'
workflow_dispatch:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
ruby: ['head', '3.2', '3.1']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
env:
# https://github.com/kachick/irb-power_assert/blob/104834846baf5caa1e8536a11c43acdd56fc849c/CONTRIBUTING.md#adding-dependencies-for-this-gem
BUNDLE_WITHOUT: development
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- run: bundle exec rake test
env:
BUNDLE_WITHOUT: development
rubocop:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- run: bundle exec rake rubocop