Test against Ruby 3.4 #114
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: Tests and Linting | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
jobs: | |
unit_tests: | |
name: Unit Tests | |
if: ${{ ! contains(github.event.head_commit.message, '[ci skip]') }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos | |
- ubuntu | |
ruby: | |
- '3.0' | |
- '3.1' | |
- '3.2' | |
- '3.3' | |
- '3.4' | |
allow_failures: | |
- false | |
env: | |
BUNDLE_GEMFILE: "${{ matrix.gemfile }}" | |
ALLOW_FAILURES: "${{ matrix.allow_failures }}" | |
runs-on: ${{ matrix.os }}-latest | |
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Test | |
run: bundle exec rake spec || $ALLOW_FAILURES | |
lint: | |
name: Linting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.2' | |
bundler-cache: true | |
- name: Install dependencies | |
run: bundle install | |
- name: Lint Ruby | |
run: bundle exec standardrb | |
- name: Lint JSON | |
run: bundle exec jsonlint data/dictionary.json |