diff --git a/.github/workflows/windows.yml b/.github/workflows/test.yml similarity index 51% rename from .github/workflows/windows.yml rename to .github/workflows/test.yml index b3c39e74..6ee8bd06 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/test.yml @@ -1,23 +1,31 @@ -name: windows +name: test -on: [push, pull_request] +on: + push: + branches: + - master + + pull_request: jobs: build: - runs-on: windows-latest + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - ruby: [2.7, 2.6, 2.5, 2.4] + ruby: [2.7, 2.6, 2.5, 2.4, head, jruby-head] + os: [ubuntu-latest, windows-latest] + env: + RUBYOPT: -W0 steps: - uses: actions/checkout@master - - name: Set up Ruby - uses: ruby/setup-ruby@v1 + - name: Setup OS dependencies + uses: MSP-Greg/setup-ruby-pkgs@v1 with: ruby-version: ${{ matrix.ruby }} + apt-get: libsqlite3-dev - name: Install dependencies run: | - ruby -e "Dir['{,spec/**/}Gemfile.lock'].each { |f| File.write(f, File.read(f).split('BUNDLED WITH').first)}" bundle install - name: Change TMPDIR to something non symlinked run: | @@ -25,3 +33,4 @@ jobs: mkdir $HOME/tmp - name: Run test run: bundle exec rake + continue-on-error: ${{ endsWith(matrix.ruby, 'head') }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e6dd9154..00000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -env: - - RUBYOPT=-W0 -rvm: - - 2.4 - - 2.5 - - 2.6 - - ruby-head - - jruby-head -branches: - only: [master] -sudo: false -cache: - bundler: true - directories: - - spec/fixtures/rails51/vendor/bundle - - spec/fixtures/rails52/vendor/bundle -matrix: - allow_failures: - - rvm: ruby-head - - rvm: jruby-head - fast_finish: true -bundler_args: "--jobs 4" -before_install: ruby -e "Dir['{,spec/**/}Gemfile.lock'].each { |f| File.write(f, File.read(f).split('BUNDLED WITH').first)}" diff --git a/spec/integration_spec.rb b/spec/integration_spec.rb index 23bc2a8a..7b157bcd 100644 --- a/spec/integration_spec.rb +++ b/spec/integration_spec.rb @@ -540,7 +540,7 @@ class A < Spinach::FeatureSteps describe "graceful shutdown" do # Process.kill on Windows doesn't work as expected. It kills all process group instead of just one process. it "passes on int signal to child processes", unless: Gem.win_platform? do - timeout = (ENV["TRAVIS"] ? 4 : 2) # travis is slower so it needs some extra time + timeout = 2 write "spec/test_spec.rb", "sleep #{timeout}; describe { specify { 'Should not get here' }; specify { p 'Should not get here either'} }" pid = nil Thread.new { sleep timeout - 0.5; Process.kill("INT", pid) } @@ -553,7 +553,7 @@ class A < Spinach::FeatureSteps # Process.kill on Windows doesn't work as expected. It kills all process group instead of just one process. it "exits immediately if another int signal is received", unless: Gem.win_platform? do - timeout = (ENV["TRAVIS"] ? 4 : 2) # travis is slower so it needs some extra time + timeout = 2 write "spec/test_spec.rb", "describe { specify { sleep #{timeout}; p 'Should not get here'} }" pid = nil Thread.new { sleep timeout - 0.5; Process.kill("INT", pid) }