Merge pull request #574 from kg8m/ruby3_4 #951
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: Checks | |
on: | |
push: | |
branches: | |
- main | |
- "*-stable" | |
pull_request: | |
jobs: | |
test: | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby-version: | |
- "3.2" | |
- "3.3" | |
- "3.4" | |
rails-version: | |
- "~> 7.0.0" | |
- "~> 7.1.0" | |
- "~> 7.2.0" | |
- "~> 8.0.0" | |
addressable-version: | |
- "~> 2.4.0" | |
- "~> 2.5.0" | |
- "~> 2.6.0" | |
- "~> 2.7.0" | |
- "~> 2.8.0" | |
runs-on: ubuntu-latest | |
env: | |
# Ignore `Gemfile.lock` on CI. | |
BUNDLE_GEMFILE: ${{ github.workspace }}/Gemfile.ci | |
RAILS_VERSION: ${{ matrix.rails-version }} | |
ADDRESSABLE_VERSION: ${{ matrix.addressable-version }} | |
name: >- | |
Test -- | |
Ruby ${{ matrix.ruby-version }} && | |
Rails ${{ matrix.rails-version }} && | |
Addressable ${{ matrix.addressable-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
# https://github.com/ruby/setup-ruby | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true | |
- name: Setup DB | |
run: bin/rails db:migrate | |
timeout-minutes: 5 | |
- name: RSpec | |
run: bundle exec rake spec | |
timeout-minutes: 5 | |
lint: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
name: Lint | |
steps: | |
- uses: actions/checkout@v4 | |
# https://github.com/ruby/setup-ruby | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.4" | |
bundler-cache: true | |
- name: RuboCop | |
run: bundle exec rake rubocop | |
timeout-minutes: 5 | |
typecheck: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
name: Typecheck | |
steps: | |
- uses: actions/checkout@v4 | |
# https://github.com/ruby/setup-ruby | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.4" | |
bundler-cache: true | |
- name: Prepare for typecheck | |
run: bundle exec rake steep:prepare | |
timeout-minutes: 5 | |
- name: Run typecheck | |
run: bundle exec rake steep:check | |
timeout-minutes: 5 | |
documentation-check: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
name: Documentation syntax check | |
steps: | |
- uses: actions/checkout@v4 | |
# https://github.com/ruby/setup-ruby | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.4" | |
bundler-cache: true | |
- name: Check YARD docs | |
run: bundle exec rake yard:check | |
timeout-minutes: 5 |