Skip to content

Commit

Permalink
Use test_runner for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MSP-Greg committed Oct 27, 2023
1 parent c9806d1 commit 22ee732
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
- name: test
if: ${{ needs.skip_duplicate_runs.outputs.should_skip != 'true' }}
timeout-minutes: 6
run: bundle exec rake test:all
run: ./test_runner --verbose

test_non_mri:
name: >-
Expand Down Expand Up @@ -206,7 +206,7 @@ jobs:
if: | # only run if previous steps have succeeded
success() &&
(needs.skip_duplicate_runs.outputs.should_skip != 'true')
run: bundle exec rake test:all
run: ./test_runner --verbose

- name: >-
Test outcome: ${{ steps.test.outcome }}
Expand Down
13 changes: 13 additions & 0 deletions test_runner
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env ruby

# simplified test runner, runs all tests, todo: add more options

require 'bundler/setup'

if RUBY_VERSION >= '2.5'
Dir['test/test_*.rb', base: __dir__].each { |tf| require_relative tf }
else
Dir["#{__dir__}/test/test_*.rb"].each { |tf| require tf }
end

require 'minitest'
2 changes: 2 additions & 0 deletions test_runner.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@ECHO OFF
@ruby.exe -x "%~dpn0" %*

0 comments on commit 22ee732

Please sign in to comment.