開発版のRubyでCIを実行


開発版のRubyでCIを実行

https://product.st.inc/entry/2025/02/03/160859

一旦GitHub Actionsでの話。

RubyGemsで試す場合は同じworkflowに載せるのも手。

setup-rubyruby-versionheadにすると trunkバージョンのものを使うことができる。

name: RSpec

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

jobs:
  rspec:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        ruby-version: ["3.1", "3.2", "3.3", "3.4", "head"]
    steps:
      - uses: actions/checkout@v4
      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby-version }}
      - name: Install Bundler dependencies
        run: bundle install
      - name: Run RSpec
        run: bundle exec rspec

Ruby, GitHub Actions