chore: add .tool-versions file to set ruby version for development #417
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ruby | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
ruby: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby: | |
- '2.7' | |
- '3.0' | |
- '3.1' | |
- '3.2' | |
gemfile: | |
- binding_of_caller.gemfile | |
- delayed_job.gemfile | |
- hanami.gemfile | |
- rack.gemfile | |
- rack_1.gemfile | |
- rails5.2.gemfile | |
- rails6.0.gemfile | |
- rails6.1.gemfile | |
- rails7.0.gemfile | |
- resque.gemfile | |
- sinatra.gemfile | |
- sinatra_1.gemfile | |
- sidekiq.gemfile | |
- sidekiq7.gemfile | |
- standalone.gemfile | |
exclude: | |
- gemfile: hanami.gemfile | |
ruby: '2.7' | |
- gemfile: rails5.2.gemfile | |
ruby: '3.0' | |
- gemfile: rails5.2.gemfile | |
ruby: '3.1' | |
- gemfile: rails5.2.gemfile | |
ruby: '3.2' | |
# Has to be top level to cache properly | |
env: | |
BUNDLE_GEMFILE: "gemfiles/${{ matrix.gemfile }}" | |
BUNDLE_JOBS: 4 | |
BUNDLE_PATH: "vendor/bundle" | |
BUNDLE_WITHOUT: "development" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Build and test regular ruby | |
run: | | |
bundle exec rake | |
jruby: | |
runs-on: ubuntu-20.04 # ubuntu-latest is currently 22.04, which doesn't have a supported JRuby 9 build yet | |
strategy: | |
matrix: | |
ruby: | |
- 'jruby-9.2.14.0' | |
gemfile: | |
- rails6.0.gemfile | |
- rails6.1.gemfile | |
# TODO | |
# - rails7.0.gemfile | |
# Has to be top level to cache properly | |
env: | |
BUNDLE_GEMFILE: "gemfiles/${{ matrix.gemfile }}" | |
BUNDLE_JOBS: 4 | |
BUNDLE_PATH: "vendor/bundle" | |
BUNDLE_WITHOUT: "development" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JRuby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Build and test jruby | |
run: | | |
bundle exec rake spec:integrations spec:units |