Skip to content

Commit

Permalink
Share Rails versions across matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
pezholio committed May 17, 2024
1 parent 96132c9 commit c228dc0
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/rails-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,25 @@ on:
branches:
- main

env:
RAILS_VERSIONS: '["5.2.8.1", "6.1.7.6", "7.1.3.2"]'

jobs:
set-matrix:
runs-on: ubuntu-latest
outputs:
RAILS_VERSIONS: ${{ env.RAILS_VERSIONS }}
steps:
- name: Compute outputs
run: |
echo "RAILS_VERSIONS=${{ env.RAILS_VERSIONS }}" >> $GITHUB_OUTPUT
build-rails:
strategy:
fail-fast: false
matrix:
rails: [ 5.2.8.1, 6.1.7.6, 7.1.3.2 ]
rails: ${{ fromJSON(needs.set-matrix.outputs.RAILS_VERSIONS) }}
runs-on: ubuntu-latest
needs: set-matrix
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -40,9 +52,11 @@ jobs:
strategy:
fail-fast: false
matrix:
rails: [ 5.2.8.1, 6.1.7.6, 7.1.3.2 ]
rails: ${{ fromJSON(needs.set-matrix.outputs.RAILS_VERSIONS) }}
runs-on: ubuntu-latest
needs: build-rails
needs:
- set-matrix
- build-rails
steps:
- name: Download image
uses: actions/download-artifact@v4
Expand All @@ -61,9 +75,11 @@ jobs:
strategy:
fail-fast: false
matrix:
rails: [ 5.2.8.1, 6.1.7.6, 7.1.3.2 ]
rails: ${{ fromJSON(needs.set-matrix.outputs.RAILS_VERSIONS) }}
runs-on: ubuntu-latest
needs: build-rails
needs:
- set-matrix
- build-rails
steps:
- name: Download image
uses: actions/download-artifact@v4
Expand Down

0 comments on commit c228dc0

Please sign in to comment.