Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with GitHub Actions #738

Merged
merged 2 commits into from
Nov 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# This workflow will download a prebuilt Ruby version, install dependencies and
# run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby

name: Ruby

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
CUCUMBER_PUBLISH_QUIET: true

jobs:
test-ubuntu:
strategy:
matrix:
ruby: [2.4.0, 2.4, 2.5, 2.6, 2.7, jruby-9.2, ruby-head]

runs-on: ubuntu-latest

continue-on-error: ${{ endsWith(matrix.ruby, 'head') }}

steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake

test-macos:
strategy:
matrix:
ruby: [2.4, 2.5, 2.6, 2.7]

runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake

lint:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- name: Run linters
run: bundle exec rake lint
70 changes: 0 additions & 70 deletions .travis.yml

This file was deleted.

24 changes: 12 additions & 12 deletions features/02_configure_aruba/basics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Feature: Usage of configuration
Given a file named "spec/support/aruba_config.rb" with:
"""ruby
Aruba.configure do |config|
config.exit_timeout = 0.1
config.exit_timeout = 0.5
end
"""
And a file named "spec/usage_configuration_spec.rb" with:
Expand All @@ -38,7 +38,7 @@ Feature: Usage of configuration
end

context 'when slow command' do
before(:each) { run_command('aruba-test-cli 0.2') }
before(:each) { run_command('aruba-test-cli 1') }
it { expect(last_command_started).not_to be_successfully_executed }
end
end
Expand All @@ -55,7 +55,7 @@ Feature: Usage of configuration
Given a file named "spec/support/aruba_config.rb" with:
"""ruby
Aruba.configure do |config|
config.exit_timeout = 0.1
config.exit_timeout = 0.5
end
"""
And a file named "spec/support/hooks.rb" with:
Expand All @@ -64,7 +64,7 @@ Feature: Usage of configuration
config.before :each do |example|
next unless example.metadata.key? :slow_command

aruba.config.exit_timeout = 0.3
aruba.config.exit_timeout = 1.5
end
end
"""
Expand All @@ -79,12 +79,12 @@ Feature: Usage of configuration
end

context 'when slow command and this is known by the developer', :slow_command => true do
before(:each) { run_command('aruba-test-cli 0.2') }
before(:each) { run_command('aruba-test-cli 1') }
it { expect(last_command_started).to be_successfully_executed }
end

context 'when slow command, but this might be a failure' do
before(:each) { run_command('aruba-test-cli 0.2') }
before(:each) { run_command('aruba-test-cli 1') }
it { expect(last_command_started).not_to be_successfully_executed }
end
end
Expand All @@ -96,7 +96,7 @@ Feature: Usage of configuration
Given a file named "features/support/aruba_config.rb" with:
"""ruby
Aruba.configure do |config|
config.exit_timeout = 0.1
config.exit_timeout = 0.5
end
"""
And a file named "features/run.feature" with:
Expand All @@ -107,7 +107,7 @@ Feature: Usage of configuration
Then the exit status should be 0

Scenario: Slow command
When I run `aruba-test-cli 0.2`
When I run `aruba-test-cli 1.0`
Then the exit status should be 128
"""
When I run `cucumber`
Expand All @@ -122,13 +122,13 @@ Feature: Usage of configuration
Given a file named "features/support/aruba_config.rb" with:
"""ruby
Aruba.configure do |config|
config.exit_timeout = 0.1
config.exit_timeout = 0.5
end
"""
And a file named "features/support/hooks.rb" with:
"""ruby
Before '@slow-command' do
aruba.config.exit_timeout = 0.3
aruba.config.exit_timeout = 1.5
end
"""
And a file named "features/usage_configuration.feature" with:
Expand All @@ -140,11 +140,11 @@ Feature: Usage of configuration

@slow-command
Scenario: Slow command known by the developer
When I run `aruba-test-cli 0.2`
When I run `aruba-test-cli 1.0`
Then the exit status should be 0

Scenario: Slow command which might be a failure
When I run `aruba-test-cli 0.2`
When I run `aruba-test-cli 1.0`
Then the exit status should be 128
"""
When I run `cucumber`
Expand Down