Skip to content

Commit 12c0b37

Browse files
committed
[rb] this should only run failures on test retries
1 parent e6c0455 commit 12c0b37

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

.github/workflows/ruby-examples.yml

+13-5
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,19 @@ jobs:
8383
with:
8484
distribution: 'temurin'
8585
java-version: 11
86-
- name: Run tests
86+
- name: Run tests on Windows
87+
if: matrix.os == 'windows'
88+
uses: nick-invision/[email protected]
89+
with:
90+
timeout_minutes: 20
91+
max_attempts: 2
92+
command: cd examples/ruby && bundle exec rspec
93+
new_command_on_retry: DEBUG=true cd examples/ruby && bundle exec rspec --only-failures
94+
- name: Run tests on Linux/Mac
95+
if: matrix.os != 'windows'
8796
uses: nick-invision/[email protected]
8897
with:
8998
timeout_minutes: 20
90-
max_attempts: 3
91-
command: |
92-
cd examples/ruby
93-
bundle exec rspec
99+
max_attempts: 2
100+
command: cd examples/ruby && bundle exec rspec
101+
new_command_on_retry: $env:DEBUG="true" cd examples/ruby && bundle exec rspec --only-failures

examples/ruby/spec/spec_helper.rb

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
# Disable RSpec exposing methods globally on `Module` and `main`
1111
config.disable_monkey_patching!
12+
Dir.mktmpdir('tmp')
13+
config.example_status_persistence_file_path = "tmp/examples.txt"
1214

1315
config.expect_with :rspec do |c|
1416
c.syntax = :expect

0 commit comments

Comments
 (0)