Skip to content

Commit 93c0149

Browse files
authored
Merge pull request #296 from aws/workflow-rebased
Trigger Workflow Actions for push and pr on master branch
2 parents e0cc2a3 + b0d4c4f commit 93c0149

File tree

4 files changed

+54
-3
lines changed

4 files changed

+54
-3
lines changed

.github/workflows/ruby.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7+
8+
name: Ruby
9+
10+
on:
11+
push:
12+
branches: [ master ]
13+
pull_request:
14+
branches: [ master ]
15+
16+
jobs:
17+
test:
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
ruby-version: ['2.6', '2.7']
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Set up Ruby
25+
uses: ruby/setup-ruby@v1
26+
with:
27+
ruby-version: ${{ matrix.ruby-version }}
28+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
29+
- name: Run tests
30+
run: bundle exec rake
31+
- name: Coveralls
32+
uses: coverallsapp/github-action@master
33+
with:
34+
github-token: ${{ secrets.GITHUB_TOKEN }}

Gemfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ gem "codedeploy-commands", "1.0.0", :path => "#{File.expand_path(__FILE__)}/../v
1111
group :test do
1212
gem 'test-unit'
1313
gem 'activesupport', :require => 'active_support'
14-
gem 'coveralls', require: false
14+
gem 'coveralls_reborn', require: false
1515
gem 'cucumber'
1616
gem 'fakefs', :require => 'fakefs/safe'
1717
gem 'mocha'
@@ -20,4 +20,6 @@ group :test do
2020
gem 'shoulda'
2121
gem 'shoulda-matchers'
2222
gem 'shoulda-context'
23+
gem 'simplecov', require: false
24+
gem 'simplecov-lcov', require: false
2325
end

spec/spec_helper.rb

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
require 'simplecov'
2+
3+
SimpleCov.start do
4+
if ENV['CI']
5+
require 'simplecov-lcov'
6+
7+
SimpleCov::Formatter::LcovFormatter.config do |c|
8+
c.report_with_single_file = true
9+
c.single_report_path = 'coverage/lcov.info'
10+
end
11+
12+
formatter SimpleCov::Formatter::LcovFormatter
13+
end
14+
15+
add_filter %w[version.rb initializer.rb]
16+
end
17+
118
# Encoding: UTF-8
219
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
320
require 'bundler/setup'

test/test_helper.rb

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
$:.unshift "lib"
33
Gem.use_paths(nil, Gem.path << "vendor")
44

5-
require 'coveralls'
6-
Coveralls.wear!
75
require 'thread'
86
require 'rubygems'
97
require "bundler"

0 commit comments

Comments
 (0)