diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a11f0e9..5ed2322a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,10 @@ jobs: os: - macos-latest - ubuntu-latest + - windows-latest + exclude: + - os: windows-latest + ruby: truffleruby-head runs-on: ${{ matrix.os }} timeout-minutes: 10 env: diff --git a/Rakefile b/Rakefile index 59067f90..10c3076e 100644 --- a/Rakefile +++ b/Rakefile @@ -9,12 +9,19 @@ task default: %i[test rubocop] begin fork { nil } rescue NotImplementedError - # jruby and windows can't fork so use vanilla rake instead + # jruby, truffleruby, and windows can't fork so use vanilla rake instead + warn 'warn: fork is not implemented on this Ruby, falling back to vanilla rake' require 'rake/testtask' + Rake::TestTask.new do |t| + t.libs << 'test' + t.test_files = FileList['test/test_*.rb'] + t.verbose = true + end else desc 'Run each test in isolation' task :test do sh 'forking-test-runner test/test_* --helper test/helper.rb --verbose' end end + RuboCop::RakeTask.new diff --git a/bin/ci b/bin/ci index 074d299e..b4d09a5a 100755 --- a/bin/ci +++ b/bin/ci @@ -2,7 +2,8 @@ set -e -if [[ "$OSTYPE" == "darwin"* ]]; then +echo $OSTYPE +if [[ "$OSTYPE" != "linux-gnu" ]]; then bundle exec rake test else # Sometimes minitest starts and then just hangs printing nothing.