Skip to content

Commit 8fc8a1f

Browse files
committed
Update CI for coveralls.
1 parent 8ec503e commit 8fc8a1f

4 files changed

Lines changed: 18 additions & 25 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ jobs:
2222
runs-on: ubuntu-latest
2323
env:
2424
CI: true
25+
ALLOW_FAILURES: ${{ endsWith(matrix.ruby, 'head') }}
2526
strategy:
2627
fail-fast: false
2728
matrix:
2829
ruby:
29-
- 2.4
3030
- 2.5
3131
- 2.6
3232
- 2.7
@@ -43,5 +43,9 @@ jobs:
4343
- name: Install dependencies
4444
run: bundle install --jobs 4 --retry 3
4545
- name: Run tests
46-
run: bundle exec rspec spec
47-
46+
run: bundle exec rspec spec || $ALLOW_FAILURES
47+
- name: Coveralls GitHub Action
48+
uses: coverallsapp/github-action@v1.1.2
49+
if: "matrix.ruby == '3.0'"
50+
with:
51+
github-token: ${{ secrets.GITHUB_TOKEN }}

.travis.yml

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

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ group :debug do
1010
end
1111

1212
group :development, :test do
13-
gem 'simplecov', require: false, platforms: :mri
14-
gem 'coveralls', require: false, platforms: :mri
13+
gem 'simplecov', '~> 0.21', platforms: :mri
14+
gem 'simplecov-lcov', '~> 0.8', platforms: :mri
1515
end

spec/spec_helper.rb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,17 @@
22
require 'rdf'
33
begin
44
require 'simplecov'
5-
require 'coveralls'
5+
require 'simplecov-lcov'
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+
613
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
714
SimpleCov::Formatter::HTMLFormatter,
8-
Coveralls::SimpleCov::Formatter
15+
SimpleCov::Formatter::LcovFormatter
916
])
1017
SimpleCov.start do
1118
add_filter "matchers.rb"

0 commit comments

Comments
 (0)