Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRY-up test workflow. #2423

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,27 @@ jobs:
fail-fast: false
matrix:
ruby: ['2.7', '3.0', '3.1', '3.2', '3.3']
gemfile: [rack_2_0, rack_3_0, rails_6_0, rails_6_1, rails_7_0, rails_7_1]
integration: [false]
gemfile: [Gemfile, gemfiles/rack_2_0.gemfile, gemfiles/rack_3_0.gemfile, gemfiles/rails_6_0.gemfile, gemfiles/rails_6_1.gemfile, gemfiles/rails_7_0.gemfile, gemfiles/rails_7_1.gemfile]
specs: ['spec --exclude-pattern=spec/integration/**/*_spec.rb']
include:
- ruby: '2.7'
integration: multi_json
gemfile: gemfiles/multi_json.gemfile
specs: 'spec/integration/multi_json'
- ruby: '2.7'
integration: multi_xml
gemfile: gemfiles/multi_xml.gemfile
specs: 'spec/integration/multi_xml'
- ruby: '2.7'
integration: rack_2_0
gemfile: gemfiles/rack_2_0.gemfile
specs: 'spec/integration/rack_2_0'
- ruby: '2.7'
integration: rack_3_0
gemfile: gemfiles/rack_3_0.gemfile
specs: 'spec/integration/rack_3_0'
- ruby: '3.3'
integration: no_dry_validation
gemfile: gemfiles/no_dry_validation.gemfile
specs: 'spec/integration/no_dry_validation'
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.integration || matrix.gemfile }}.gemfile
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
steps:
- uses: actions/checkout@v4

Expand All @@ -49,13 +54,8 @@ jobs:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Run tests
if: ${{ !matrix.integration }}
run: bundle exec rake spec

- name: Run integration tests (spec/integration/${{ matrix.integration }})
if: ${{ matrix.integration }}
run: bundle exec rspec spec/integration/${{ matrix.integration }}
- name: Run Tests (${{ matrix.specs }})
run: bundle exec rspec ${{ matrix.specs }}

- name: Coveralls
uses: coverallsapp/github-action@master
Expand Down
Loading