Skip to content

Commit

Permalink
test: split tests with directories
Browse files Browse the repository at this point in the history
  • Loading branch information
requiemformemories committed Aug 28, 2024
1 parent fda2c06 commit fb9e7e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ jobs:

client: ['active_record', 'redis']

pattern: ['functional', 'support', 'unit']

env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile

Expand All @@ -79,10 +81,11 @@ jobs:
$POSTGRES_DB
- name: Run tests
run: bundle exec rake
run: bundle exec rake spec
env:
# The hostname used to communicate with the PostgreSQL service container
POSTGRES_HOST: localhost
# The default PostgreSQL port
POSTGRES_PORT: 5432
CLIENT: ${{ matrix.client }}
PATTERN: spec/${{ matrix.pattern }}/*_spec.rb
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require 'rubocop/rake_task'
Dir["lib/tasks/*.rake"].each { |rake| load rake }

RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = 'spec/**/*_spec.rb'
spec.pattern = ENV['PATTERN'] || 'spec/**/*_spec.rb'
spec.rspec_opts = ['--backtrace']
end

Expand Down

0 comments on commit fb9e7e2

Please sign in to comment.