renderedtext / test-boosters

Auto Parallelization - runs test files in multiple jobs
MIT License
54 stars 40 forks source link

Added support for file exclude pattern that can be set with TEST_BOOSTERS_RSPEC_TEST_EXCLUDE_PATTERN #72

Closed ndbroadbent closed 3 years ago

ndbroadbent commented 4 years ago

Fixes #71. Related to #68 (but exclude instead of include)

This PR adds a TEST_BOOSTERS_RSPEC_TEST_EXCLUDE_PATTERN env variable to exclude some files with a glob pattern. (Similar to the --exclude-pattern option for RSpec, which doesn't work when we specify a list of explicit files.)

adamjsimon commented 3 years ago

@ndbroadbent @shiroyasha @justinbburris @bmarkons Would it be possible to get this reviewed and merged?

bmarkons commented 3 years ago

Hi, can you use this generic variable TB_RSPEC_OPTIONS for providing additional options to rspec?

https://github.com/renderedtext/test-boosters#rspec-booster

image

adamjsimon commented 3 years ago

@bmarkons I tried using that option with the following and did not observe the options being respected by the test run.

   env_vars:
        - name: TB_RSPEC_OPTIONS
          value: '--exclude-pattern "spec/system/**/*_spec.rb"'
bmarkons commented 3 years ago

I see. We have tested this out as well but it seems the exclude pattern is not respected when you provide the explicit list of specs to run.

This code looks great! Sorry for delay with merging. I will release the new gem version so you can use it.

bmarkons commented 3 years ago

The new gem version 2.7.0 is released. Please install the latest version in your job environment. :) I hope this will work for you.

rmsbackup commented 3 years ago

@bmarkons Awesome! Thanks for getting this merged and releasing the new version. I will test it out :)