From c147c836ba52cc7772d4b0c31e8df1ca228618b3 Mon Sep 17 00:00:00 2001 From: Nony Dutton Date: Thu, 9 Mar 2023 13:21:38 +0100 Subject: [PATCH] Test with Ruby 3.2 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. --- .github/workflows/ci.yml | 47 +++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ae52726..1105b5a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: CI on: push jobs: - test: + tests: runs-on: ubuntu-latest services: @@ -27,6 +27,7 @@ jobs: - "2.7" - "3.0" - "3.1" + - "3.2" gemfile: - rails5.1 - rails5.2 @@ -34,26 +35,21 @@ jobs: - 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: @@ -61,6 +57,21 @@ jobs: 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: