Skip to content

Commit 4903e9b

Browse files
committed
Coveralls update.
1 parent 46cfbf7 commit 4903e9b

3 files changed

Lines changed: 18 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,11 @@ jobs:
2121
if: "contains(github.event.commits[0].message, '[ci skip]') == false"
2222
runs-on: ubuntu-latest
2323
env:
24-
CI: true
25-
ALLOW_FAILURES: false # ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'jruby' }}
24+
ALLOW_FAILURES: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'jruby' }}
2625
strategy:
2726
fail-fast: false
2827
matrix:
2928
ruby:
30-
- 2.4
3129
- 2.5
3230
- 2.6
3331
- 2.7
@@ -45,4 +43,8 @@ jobs:
4543
run: bundle install --jobs 4 --retry 3
4644
- name: Run tests
4745
run: bundle exec rspec spec || $ALLOW_FAILURES
48-
46+
- name: Coveralls GitHub Action
47+
uses: coverallsapp/github-action@v1.1.2
48+
if: "matrix.ruby == '3.0'"
49+
with:
50+
github-token: ${{ secrets.GITHUB_TOKEN }}

Gemfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ group :test do
3131
gem "rake"
3232
gem "equivalent-xml"
3333
gem 'fasterer'
34-
gem 'simplecov', '~> 0.16', platforms: :mri
35-
gem 'coveralls', '~> 0.8', platforms: :mri
34+
gem 'simplecov', '~> 0.21', platforms: :mri
35+
gem 'simplecov-lcov', '~> 0.8', platforms: :mri
36+
gem 'coveralls', platforms: :mri
3637
end

spec/spec_helper.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
require "bundler/setup"
22
begin
33
require 'simplecov'
4+
require 'simplecov-lcov'
45
require 'coveralls'
6+
7+
SimpleCov::Formatter::LcovFormatter.config do |config|
8+
#Coveralls is coverage by default/lcov. Send info results
9+
config.report_with_single_file = true
10+
config.single_report_path = 'coverage/lcov.info'
11+
end
12+
513
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
614
SimpleCov::Formatter::HTMLFormatter,
7-
Coveralls::SimpleCov::Formatter
15+
SimpleCov::Formatter::LcovFormatter
816
])
917
SimpleCov.start do
1018
add_group "Mixins", 'lib/rdf/mixin'

0 commit comments

Comments
 (0)