Skip to content

Commit

Permalink
STORY-19252: Keep test matrix automatically up to date
Browse files Browse the repository at this point in the history
  • Loading branch information
dcaddell committed Sep 26, 2024
1 parent 67999eb commit 046a6d9
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,32 @@
name: Pipeline
on: [push]
jobs:
ruby-versions:
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.versions.outputs.supported_versions }}
steps:
- id: versions
uses: Invoca/supported_ruby_versions_action@main

gemfiles:
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.gemfiles.outputs.gemfiles }}
steps:
- id: gemfiles
uses: actions/checkout@v2
- run: |
echo "gemfiles=[$(ls -1 gemfiles/*.gemfile),Gemfile]" >> $GITHUB_ENV
tests:
name: Unit Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: [3.1, 3.2, 3.3]
gemfile:
- Gemfile
- gemfiles/activerecord_6_0.gemfile
- gemfiles/activerecord_6_1.gemfile
- gemfiles/activerecord_7_0.gemfile
- gemfiles/activerecord_7_1.gemfile
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
gemfile: ${{ fromJson(needs.gemfiles.outputs.gemfiles) }}
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
steps:
Expand All @@ -25,6 +38,7 @@ jobs:
bundler-cache: true
- run: bundle exec rails db:migrate
- run: bundle exec rake test

build_success:
if: always()
needs:
Expand Down

0 comments on commit 046a6d9

Please sign in to comment.