Skip to content

Commit

Permalink
CI: Tweak timeouts; remove Truffle and Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
janlelis committed Jun 4, 2021
1 parent ed2df3e commit 707b6e4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 26 deletions.
41 changes: 20 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
- 2.7
- 2.6
- jruby-9.2.16.0
- truffleruby-21.1.0
os:
- ubuntu-latest
- macos-latest
Expand All @@ -28,23 +27,23 @@ jobs:
- name: Run tests
run: bundle exec rake

test-windows:
name: Ruby ${{ matrix.ruby }} (windows-latest)
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
ruby:
- 3.0
- 2.7
- 2.6
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
bundler-cache: true
- run: cinst ansicon
- name: Run tests
run: bundle exec rake
# test-windows:
# name: Ruby ${{ matrix.ruby }} (windows-latest)
# if: "!contains(github.event.head_commit.message, '[skip ci]')"
# strategy:
# matrix:
# ruby:
# - 3.0
# - 2.7
# - 2.6
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v2
# - name: Set up Ruby
# uses: ruby/setup-ruby@v1
# with:
# ruby-version: ${{matrix.ruby}}
# bundler-cache: true
# - run: cinst ansicon
# - name: Run tests
# run: bundle exec rake
10 changes: 5 additions & 5 deletions spec/whirly_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
require "stringio"

def short_sleep
sleep 0.2
sleep 0.4
end

def medium_sleep
sleep 0.6
sleep 0.7
end

def long_sleep
Expand Down Expand Up @@ -170,7 +170,7 @@ def long_sleep
spinner = { "frames" => "A".."H", "mode" => "random", "interval" => 10 }

Whirly.start(spinner: spinner)
short_sleep
medium_sleep
Whirly.stop

refute /\A.*?A.*?B.*?C.*?D.*?E.*?F.*?G.*?H/m =~ @capture.string
Expand Down Expand Up @@ -201,12 +201,12 @@ def long_sleep
it "spins more often when interval is lower" do
capture1 = StringIO.new
Whirly.start(stream: capture1, interval: 100)
medium_sleep
long_sleep
Whirly.stop

capture2 = StringIO.new
Whirly.start(stream: capture2, interval: 50)
medium_sleep
long_sleep
Whirly.stop

assert capture1.string.size < capture2.string.size
Expand Down

0 comments on commit 707b6e4

Please sign in to comment.