diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6826cd41..99f5d734 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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 diff --git a/Rakefile b/Rakefile index fead82a5..6d11a4ba 100644 --- a/Rakefile +++ b/Rakefile @@ -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