Use GitHub Actions to upload Coveralls report
This commit is contained in:
parent
f7c7b56bd0
commit
434cc59ae8
4 changed files with 17 additions and 25 deletions
6
.github/workflows/ruby.yml
vendored
6
.github/workflows/ruby.yml
vendored
|
@ -50,6 +50,10 @@ jobs:
|
|||
- name: Run tests
|
||||
run: bundle exec rake rspec-rerun:spec
|
||||
env:
|
||||
COVERALLS: 1
|
||||
COVERAGE: lcov
|
||||
DATABASE_URL: mysql2://user:password@127.0.0.1/test
|
||||
RAILS_ENV: test
|
||||
- name: Upload coverage report to Coveralls
|
||||
uses: coverallsapp/github-action@v1.1.2
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
2
Gemfile
2
Gemfile
|
@ -111,7 +111,7 @@ group :test do
|
|||
gem 'i18n-spec'
|
||||
# code coverage
|
||||
gem 'simplecov', require: false
|
||||
gem 'coveralls', require: false
|
||||
gem 'simplecov-lcov', require: false
|
||||
# api
|
||||
gem 'apivore', require: false
|
||||
gem 'hashie', '~> 3.4.6', require: false # https://github.com/westfieldlabs/apivore/issues/114
|
||||
|
|
25
Gemfile.lock
25
Gemfile.lock
|
@ -166,12 +166,6 @@ GEM
|
|||
concurrent-ruby (1.1.7)
|
||||
connection_pool (2.2.3)
|
||||
content_for_in_controllers (0.0.2)
|
||||
coveralls (0.7.1)
|
||||
multi_json (~> 1.3)
|
||||
rest-client
|
||||
simplecov (>= 0.7)
|
||||
term-ansicolor
|
||||
thor
|
||||
crass (1.0.6)
|
||||
daemons (1.3.1)
|
||||
database_cleaner (1.8.5)
|
||||
|
@ -186,8 +180,6 @@ GEM
|
|||
diff-lcs (1.4.4)
|
||||
diffy (3.4.0)
|
||||
docile (1.3.2)
|
||||
domain_name (0.5.20190701)
|
||||
unf (>= 0.0.5, < 1.0.0)
|
||||
doorkeeper (5.4.0)
|
||||
railties (>= 5)
|
||||
doorkeeper-i18n (5.2.2)
|
||||
|
@ -232,9 +224,6 @@ GEM
|
|||
nokogiri (>= 1.6.0)
|
||||
ruby_parser (~> 3.5)
|
||||
htmlentities (4.3.4)
|
||||
http-accept (1.7.0)
|
||||
http-cookie (1.0.3)
|
||||
domain_name (~> 0.5)
|
||||
i18n (1.8.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
i18n-js (3.0.11)
|
||||
|
@ -315,7 +304,6 @@ GEM
|
|||
mustermann (1.1.1)
|
||||
ruby2_keywords (~> 0.0.1)
|
||||
mysql2 (0.5.3)
|
||||
netrc (0.11.0)
|
||||
nio4r (2.5.2)
|
||||
nokogiri (1.10.10)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
|
@ -412,11 +400,6 @@ GEM
|
|||
redis-namespace (~> 1.6)
|
||||
sinatra (>= 0.9.2)
|
||||
vegas (~> 0.1.2)
|
||||
rest-client (2.1.0)
|
||||
http-accept (>= 1.7.0, < 2.0)
|
||||
http-cookie (>= 1.0.2, < 2.0)
|
||||
mime-types (>= 1.16, < 4.0)
|
||||
netrc (~> 0.8)
|
||||
roo (2.8.3)
|
||||
nokogiri (~> 1)
|
||||
rubyzip (>= 1.3.0, < 3.0.0)
|
||||
|
@ -479,6 +462,7 @@ GEM
|
|||
docile (~> 1.1)
|
||||
simplecov-html (~> 0.11)
|
||||
simplecov-html (0.12.2)
|
||||
simplecov-lcov (0.8.0)
|
||||
sinatra (2.1.0)
|
||||
mustermann (~> 1.0)
|
||||
rack (~> 2.2)
|
||||
|
@ -499,10 +483,7 @@ GEM
|
|||
sqlite3 (1.3.13)
|
||||
sqlite3-ruby (1.3.3)
|
||||
sqlite3 (>= 1.3.3)
|
||||
sync (0.5.0)
|
||||
temple (0.8.2)
|
||||
term-ansicolor (1.7.1)
|
||||
tins (~> 1.0)
|
||||
therubyracer (0.12.3)
|
||||
libv8 (~> 3.16.14.15)
|
||||
ref
|
||||
|
@ -513,8 +494,6 @@ GEM
|
|||
thor (1.0.1)
|
||||
thread_safe (0.3.6)
|
||||
tilt (2.0.10)
|
||||
tins (1.25.0)
|
||||
sync
|
||||
ttfunk (1.6.2.1)
|
||||
twitter-bootstrap-rails (2.2.8)
|
||||
actionpack (>= 3.1)
|
||||
|
@ -569,7 +548,6 @@ DEPENDENCIES
|
|||
bullet
|
||||
capybara
|
||||
connection_pool
|
||||
coveralls
|
||||
daemons
|
||||
database_cleaner
|
||||
date_time_attribute
|
||||
|
@ -630,6 +608,7 @@ DEPENDENCIES
|
|||
simple-navigation-bootstrap
|
||||
simple_form
|
||||
simplecov
|
||||
simplecov-lcov
|
||||
spreadsheet
|
||||
sprockets (< 4)
|
||||
sqlite3 (~> 1.3.6)
|
||||
|
|
|
@ -58,6 +58,15 @@ RSpec.configure do |config|
|
|||
config.infer_spec_type_from_file_location!
|
||||
end
|
||||
|
||||
if ENV['COVERAGE'] == 'lcov'
|
||||
require 'simplecov-lcov'
|
||||
SimpleCov::Formatter::LcovFormatter.config do |c|
|
||||
c.report_with_single_file = true
|
||||
c.single_report_path = 'coverage/lcov.info'
|
||||
end
|
||||
SimpleCov.formatters = SimpleCov::Formatter::LcovFormatter
|
||||
end
|
||||
|
||||
# include default foodsoft scope in urls, so that *_path works
|
||||
# https://github.com/rspec/rspec-rails/issues/255
|
||||
class ActionDispatch::Routing::RouteSet
|
||||
|
|
Loading…
Reference in a new issue