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

Improve appveyor build 2 #817

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
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
4 changes: 4 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,12 @@ jobs:
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Install ansicon to silence colour warnings
run: cinst ansicon
- name: Run specs
run: bundle exec rake spec
- name: Run cukes
run: bundle exec rake cucumber

checks:

Expand Down
41 changes: 40 additions & 1 deletion features/01_getting_started_with_aruba/run_commands.feature
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,46 @@ Feature: Run commands with Aruba
When I successfully run `cucumber`
Then the features should all pass

@requires-ruby

@requires-cmd
Scenario: Batch Program
Given an executable named "bin/aruba-test-cli.bat" with:
"""bash
echo "Hello, Aruba!"
"""
And a file named "features/hello_aruba.feature" with:
"""
Feature: Getting Started With Aruba
Scenario: First Run of Command
Given I successfully run `aruba-test-cli`
Then the output should contain:
\"\"\"
Hello, Aruba!
\"\"\"
"""
When I successfully run `cucumber`
Then the features should all pass

@requires-cmd
Scenario: Batch Program run via cmd
Given a file named "features/hello_aruba.feature" with:
"""
Feature: Getting Started With Aruba
Scenario: First Run of Command
Given a file named "cli.bat" with:
\"\"\"
echo "Hello, Aruba!"
\"\"\"
When I successfully run `cmd.exe /c cli.bat`
Then the output should contain:
\"\"\"
Hello, Aruba!
\"\"\"
"""
When I successfully run `cucumber`
Then the features should all pass

@requires-ruby @unsupported-on-platform-windows
Scenario: Ruby Program
Given an executable named "bin/aruba-test-cli" with:
"""ruby
Expand Down
20 changes: 20 additions & 0 deletions features/step_definitions/hooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,23 @@
Before "@unsupported-on-platform-mac" do
skip_this_scenario if Cucumber::OS_X
end

Before('@requires-bash') do |scenario|
next if Aruba.platform.which('bash')

if Cucumber::VERSION < '2'
scenario.skip_invoke!
else
skip_this_scenario
end
end

Before('@requires-cmd') do |scenario|
next if Aruba.platform.which('cmd')

if Cucumber::VERSION < '2'
scenario.skip_invoke!
else
skip_this_scenario
end
end