Skip to content

Commit

Permalink
Test with Ruby 3.2
Browse files Browse the repository at this point in the history
Tests Rails 6.1 & 7.0 with Ruby 3.2.

Also, this creates a separate CI job that only succeeds if the entire
matrix in the `test` job passes. This allows us to have 1 required check
instead of many.
  • Loading branch information
HeyNonster committed Mar 9, 2023
1 parent f93f2cd commit c147c83
Showing 1 changed file with 29 additions and 18 deletions.
47 changes: 29 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on: push

jobs:
test:
tests:
runs-on: ubuntu-latest

services:
Expand All @@ -27,40 +27,51 @@ jobs:
- "2.7"
- "3.0"
- "3.1"
- "3.2"
gemfile:
- rails5.1
- rails5.2
- rails6.0
- rails6.1
- rails7.0
exclude:
- ruby-version: "2.7"
gemfile: rails5.1
- ruby-version: "2.7"
gemfile: rails5.2
- ruby-version: "3.0"
gemfile: rails5.1
- ruby-version: "3.0"
gemfile: rails5.2
- ruby-version: "3.1"
gemfile: rails5.1
- ruby-version: "3.1"
gemfile: rails5.2
- ruby-version: "3.1"
gemfile: rails6.0
- ruby-version: "2.6"
gemfile: rails7.0
- {ruby-version: "2.6", gemfile: rails7.0}
- {ruby-version: "2.7", gemfile: rails5.1}
- {ruby-version: "2.7", gemfile: rails5.2}
- {ruby-version: "3.0", gemfile: rails5.1}
- {ruby-version: "3.0", gemfile: rails5.2}
- {ruby-version: "3.1", gemfile: rails5.1}
- {ruby-version: "3.1", gemfile: rails5.2}
- {ruby-version: "3.1", gemfile: rails6.0}
- {ruby-version: "3.2", gemfile: rails5.1}
- {ruby-version: "3.2", gemfile: rails5.2}
- {ruby-version: "3.2", gemfile: rails6.0}
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- uses: zendesk/checkout@v2
- uses: zendesk/checkout@v3
- name: Set up Ruby
uses: zendesk/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- run: bundle exec rake test

tests_successful:
name: Tests passing?
needs: tests
if: always()
runs-on: [self-hosted, zendesk-stable]
steps:
- run: |
if ${{ needs.tests.result == 'success' }}
then
echo "All tests passed"
else
echo "Some tests failed"
false
fi
lint:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit c147c83

Please sign in to comment.