Skip to content

Commit

Permalink
Merge branch 'gherkin-9' into fire-events
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-psarga committed Jan 24, 2020
2 parents f9fc78c + e07fb3f commit 71afe23
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 4 deletions.
113 changes: 113 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Ruby CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
#
version: 2.1

commands:
build:
description: "Build and run the tests"

steps:
- checkout
- restore_cache:
keys:
- bundle-{{ checksum "cucumber-wire.gemspec" }}
- run:
name: install dependencies
command: |
bundle install --jobs=4 --retry=3 --path vendor/bundle
- save_cache:
paths:
- ./vendor/bundle
key: bundle-{{ checksum "cucumber-wire.gemspec" }}

test:
description: "Run tests"
steps:
- run:
name: run tests
command: |
bundle exec rake
test_allow_failure:
description: "Run tests (allow failure so workflow is not marked as failed)"
steps:
- run:
name: run tests with allowed failure
command: |
set -o errexit
bundle exec rake
set -o errexit
jobs:
build-ruby-2_3:
docker:
- image: circleci/ruby:2.3

working_directory: ~/repo
steps:
- build
- test

build-ruby-2_4:
docker:
- image: circleci/ruby:2.4

working_directory: ~/repo
steps:
- build
- test

build-ruby-2_5:
docker:
- image: circleci/ruby:2.5

working_directory: ~/repo
steps:
- build
- test

build-ruby-2_6:
docker:
- image: circleci/ruby:2.6

working_directory: ~/repo
steps:
- build
- test

build-ruby-latest:
docker:
- image: circleci/ruby:latest

working_directory: ~/repo
steps:
- build
- test_allow_failure

workflows:
version: 2

nightly-build:
triggers:
- schedule:
cron: "0 5 * * *"
filters:
branches:
only:
- master

jobs:
- build-ruby-2_3
- build-ruby-2_4
- build-ruby-2_5
- build-ruby-2_6

build:
jobs:
- build-ruby-2_3
- build-ruby-2_4
- build-ruby-2_5
- build-ruby-2_6
- build-ruby-latest
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ end
if ENV['CUCUMBER_RUBY']
gem 'cucumber', path: ENV['CUCUMBER_RUBY']
elsif !ENV['CUCUMBER_USE_RELEASED_GEMS']
gem 'cucumber', github: 'cucumber/cucumber-ruby'
gem 'cucumber', github: 'cucumber/cucumber-ruby', branch: 'fix-cucumber-wire-failing-tests'
end

6 changes: 3 additions & 3 deletions features/timeouts.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ Feature: Wire protocol timeouts
Scenario: Try to talk to a server that's not there
Given a file named "features/step_definitions/some_remote_place.wire" with:
"""
host: localhost
host: 127.0.0.1
port: 54321
"""
When I run `cucumber -f progress`
Then the stderr should contain:
"""
Unable to contact the wire server at localhost:54321
Unable to contact the wire server at 127.0.0.1:54321
"""

@spawn
Scenario: Invoke a step definition that takes longer than its timeout
Given a file named "features/step_definitions/some_remote_place.wire" with:
"""
host: localhost
host: 127.0.0.1
port: 54321
timeout:
invoke: 0.1
Expand Down

0 comments on commit 71afe23

Please sign in to comment.