Move coveralls submission to actions workflow
This commit is contained in:
parent
efef67447b
commit
4a9f8a5e69
5 changed files with 42 additions and 26 deletions
|
@ -1 +0,0 @@
|
|||
service_name: travis-ci
|
18
.github/workflows/tests.yml
vendored
18
.github/workflows/tests.yml
vendored
|
@ -3,7 +3,7 @@ on:
|
|||
- push
|
||||
- pull_request
|
||||
jobs:
|
||||
tests:
|
||||
test:
|
||||
name: Ubuntu ${{ matrix.ubuntu }}, Ruby ${{ matrix.ruby }}
|
||||
strategy:
|
||||
matrix:
|
||||
|
@ -67,3 +67,19 @@ jobs:
|
|||
run: bundle exec rake yarn:install
|
||||
- name: Run tests
|
||||
run: bundle exec rake test:db
|
||||
- name: Report completion to Coveralls
|
||||
uses: coverallsapp/github-action@v1.1.2
|
||||
with:
|
||||
github-token: ${{ secrets.github_token }}
|
||||
flag-name: ubuntu-${{ matrix.ubuntu }}-ruby-${{ matrix.ruby }}
|
||||
parallel: true
|
||||
finish:
|
||||
name: Finalise
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Report completion to Coveralls
|
||||
uses: coverallsapp/github-action@v1.1.2
|
||||
with:
|
||||
github-token: ${{ secrets.github_token }}
|
||||
parallel-finished: true
|
||||
|
|
3
Gemfile
3
Gemfile
|
@ -141,7 +141,6 @@ end
|
|||
group :test do
|
||||
gem "brakeman"
|
||||
gem "capybara", ">= 2.15"
|
||||
gem "coveralls", :require => false
|
||||
gem "erb_lint", :require => false
|
||||
gem "factory_bot_rails"
|
||||
gem "minitest", "~> 5.1"
|
||||
|
@ -152,5 +151,7 @@ group :test do
|
|||
gem "rubocop-performance"
|
||||
gem "rubocop-rails"
|
||||
gem "selenium-webdriver"
|
||||
gem "simplecov", :require => false
|
||||
gem "simplecov-lcov", :require => false
|
||||
gem "webmock"
|
||||
end
|
||||
|
|
15
Gemfile.lock
15
Gemfile.lock
|
@ -137,12 +137,6 @@ GEM
|
|||
config (2.2.1)
|
||||
deep_merge (~> 1.2, >= 1.2.1)
|
||||
dry-validation (~> 1.0, >= 1.0.0)
|
||||
coveralls (0.8.23)
|
||||
json (>= 1.8, < 3)
|
||||
simplecov (~> 0.16.1)
|
||||
term-ansicolor (~> 1.3)
|
||||
thor (>= 0.19.4, < 2.0)
|
||||
tins (~> 1.6)
|
||||
crack (0.4.4)
|
||||
crass (1.0.6)
|
||||
dalli (2.7.11)
|
||||
|
@ -435,6 +429,7 @@ GEM
|
|||
json (>= 1.8, < 3)
|
||||
simplecov-html (~> 0.10.0)
|
||||
simplecov-html (0.10.2)
|
||||
simplecov-lcov (0.8.0)
|
||||
smart_properties (1.15.0)
|
||||
sprockets (4.0.2)
|
||||
concurrent-ruby (~> 1.0)
|
||||
|
@ -445,14 +440,9 @@ GEM
|
|||
sprockets (>= 3.0.0)
|
||||
strong_migrations (0.7.3)
|
||||
activerecord (>= 5)
|
||||
sync (0.5.0)
|
||||
term-ansicolor (1.7.1)
|
||||
tins (~> 1.0)
|
||||
thor (1.0.1)
|
||||
thread_safe (0.3.6)
|
||||
tilt (2.0.10)
|
||||
tins (1.26.0)
|
||||
sync
|
||||
tzinfo (1.2.8)
|
||||
thread_safe (~> 0.1)
|
||||
uglifier (4.2.0)
|
||||
|
@ -498,7 +488,6 @@ DEPENDENCIES
|
|||
capybara (>= 2.15)
|
||||
composite_primary_keys (~> 12.0.0)
|
||||
config
|
||||
coveralls
|
||||
dalli
|
||||
delayed_job_active_record
|
||||
dynamic_form
|
||||
|
@ -552,6 +541,8 @@ DEPENDENCIES
|
|||
sassc-rails
|
||||
secure_headers
|
||||
selenium-webdriver
|
||||
simplecov
|
||||
simplecov-lcov
|
||||
strong_migrations
|
||||
uglifier (>= 1.3.0)
|
||||
validates_email_format_of (>= 1.5.1)
|
||||
|
|
|
@ -1,21 +1,30 @@
|
|||
require "coveralls"
|
||||
Coveralls.wear!("rails")
|
||||
require "simplecov"
|
||||
require "simplecov-lcov"
|
||||
|
||||
# Override the simplecov output message, since it is mostly unwanted noise
|
||||
module SimpleCov
|
||||
module Formatter
|
||||
class HTMLFormatter
|
||||
def output_message(_result); end
|
||||
# Fix incompatibility of simplecov-lcov with older versions of simplecov that are not expresses in its gemspec.
|
||||
# https://github.com/fortissimo1997/simplecov-lcov/pull/25
|
||||
unless SimpleCov.respond_to?(:branch_coverage)
|
||||
module SimpleCov
|
||||
def self.branch_coverage?
|
||||
false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Output both the local simplecov html and the coveralls report
|
||||
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
|
||||
[SimpleCov::Formatter::HTMLFormatter,
|
||||
Coveralls::SimpleCov::Formatter]
|
||||
SimpleCov::Formatter::LcovFormatter.config do |config|
|
||||
config.report_with_single_file = true
|
||||
config.single_report_path = "coverage/lcov.info"
|
||||
end
|
||||
|
||||
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new(
|
||||
[
|
||||
SimpleCov::Formatter::HTMLFormatter,
|
||||
SimpleCov::Formatter::LcovFormatter
|
||||
]
|
||||
)
|
||||
|
||||
SimpleCov.start("rails")
|
||||
|
||||
require "securerandom"
|
||||
require "digest/sha1"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue