Skip to content

Commit

Permalink
Completly move to Github Actions (#763)
Browse files Browse the repository at this point in the history
* Run tests on ruby 2.7

* `ruby/setup-ruby` comes with the right bundler

* Add head versions to github actions file

* Add RUBYOPT to github actions config

* Only run the master branch on push

Just like in TravisCI.

* Remove TravisCI in favor of Github Actions

* Github Actions should be fast enough
  • Loading branch information
deivid-rodriguez committed Jun 10, 2020
1 parent db7d046 commit 3fdb33f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 32 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/windows.yml → .github/workflows/test.yml
@@ -1,27 +1,36 @@
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: |
echo "::set-env name=TMPDIR::$HOME/tmp"
mkdir $HOME/tmp
- name: Run test
run: bundle exec rake
continue-on-error: ${{ endsWith(matrix.ruby, 'head') }}
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions spec/integration_spec.rb
Expand Up @@ -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) }
Expand All @@ -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) }
Expand Down

0 comments on commit 3fdb33f

Please sign in to comment.