Skip to content

Commit 3fc5584

Browse files
Move CI to GitHub actions (#1565)
* Move CI to GitHub actions * Activate Rubocop on Windows
1 parent 97a03c0 commit 3fc5584

File tree

5 files changed

+29
-235
lines changed

5 files changed

+29
-235
lines changed

.circleci/config.yml

Lines changed: 0 additions & 216 deletions
This file was deleted.

.github/workflows/cucumber-ruby.yml

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,33 @@
55
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
66
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
77

8-
name: Ruby
8+
name: Test cucumber
99

1010
on:
1111
push:
12-
branches: [main, publish-option]
12+
branches:
13+
- main
14+
pull_request:
15+
branches:
16+
- main
17+
schedule:
18+
- cron: "0 5 * * *"
1319

1420
jobs:
1521
test:
16-
runs-on: ubuntu-latest
22+
strategy:
23+
matrix:
24+
os: [ubuntu-latest, macos-latest, windows-latest]
25+
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
26+
ruby: [2.5, 2.6, 2.7, '3.0']
27+
include:
28+
- os: ubuntu-latest
29+
ruby: jruby
30+
exclude:
31+
- ruby: 2.5
32+
os: windows-latest
33+
34+
runs-on: ${{ matrix.os }}
1735
steps:
1836
- uses: actions/checkout@v2
1937
- name: Set up Ruby
@@ -22,10 +40,7 @@ jobs:
2240
uses: ruby/setup-ruby@v1
2341
# uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
2442
with:
25-
ruby-version: 2.6
26-
- name: Install dependencies
27-
run: bundle install
43+
ruby-version: ${{ matrix.ruby }}
44+
bundler-cache: true
2845
- name: Run tests
29-
run: bundle exec cucumber --publish
30-
env:
31-
CUCUMBER_PUBLISH_TOKEN: ${{ secrets.CUCUMBER_PUBLISH_TOKEN }}
46+
run: bundle exec rake

Gemfile

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,5 @@ gem 'cucumber-gherkin', path: ENV['GHERKIN_RUBY'] if ENV['GHERKIN_RUBY']
2121
gem 'cucumber-html-formatter', path: ENV['CUCUMBER_HTML_FORMATTER_RUBY'] if ENV['CUCUMBER_HTML_FORMATTER_RUBY']
2222
gem 'cucumber-messages', path: ENV['CUCUMBER_MESSAGES_RUBY'] if ENV['CUCUMBER_MESSAGES_RUBY']
2323

24-
require 'rbconfig'
25-
# rubocop:disable Style/DoubleNegation
26-
is_windows = !!(RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/)
27-
# rubocop:enable Style/DoubleNegation
28-
29-
install_if -> { !is_windows } do
30-
gem 'rubocop', '~> 0.89', '= 0.89.1'
31-
gem 'rubocop-packaging', '~> 0.3', '= 0.5.1'
32-
end
24+
gem 'rubocop', '~> 0.89', '= 0.89.1'
25+
gem 'rubocop-packaging', '~> 0.3', '= 0.5.1'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[![OpenCollective](https://opencollective.com/cucumber/sponsors/badge.svg)](https://opencollective.com/cucumber)
99
[![pull requests](https://oselvar.com/api/badge?label=pull%20requests&csvUrl=https%3A%2F%2Fraw.githubusercontent.com%2Fcucumber%2Foselvar-github-metrics%2Fmain%2Fdata%2Fcucumber%2Fcucumber-ruby%2FpullRequests.csv)](https://oselvar.com/github/cucumber/oselvar-github-metrics/main/cucumber/cucumber-ruby)
1010
[![issues](https://oselvar.com/api/badge?label=issues&csvUrl=https%3A%2F%2Fraw.githubusercontent.com%2Fcucumber%2Foselvar-github-metrics%2Fmain%2Fdata%2Fcucumber%2Fcucumber-ruby%2Fissues.csv)](https://oselvar.com/github/cucumber/oselvar-github-metrics/main/cucumber/cucumber-ruby)
11-
[![CircleCI](https://circleci.com/gh/cucumber/cucumber-ruby.svg?style=svg)](https://circleci.com/gh/cucumber/cucumber-ruby)
11+
[![Test cucumber](https://github.com/cucumber/cucumber-ruby/actions/workflows/cucumber-ruby.yml/badge.svg)](https://github.com/cucumber/cucumber-ruby/actions/workflows/cucumber-ruby.yml)
1212
[![Code Climate](https://codeclimate.com/github/cucumber/cucumber-ruby.svg)](https://codeclimate.com/github/cucumber/cucumber-ruby)
1313
[![Coverage Status](https://coveralls.io/repos/cucumber/cucumber-ruby/badge.svg?branch=main)](https://coveralls.io/r/cucumber/cucumber-ruby?branch=main)
1414

Rakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
require 'rubygems'
22
require 'bundler'
3+
34
Bundler::GemHelper.install_tasks
45

56
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/lib')
@@ -12,6 +13,7 @@ require 'cucumber/rake/task'
1213
Cucumber::Rake::Task.new
1314

1415
default_tasks = %i[spec cucumber rubocop]
16+
1517
default_tasks << :examples if ENV['CI']
1618

1719
task default: default_tasks

0 commit comments

Comments
 (0)