Skip to content

Commit 815e9c4

Browse files
committed
Update CI for coveralls.
1 parent 1e120ae commit 815e9c4

4 files changed

Lines changed: 19 additions & 23 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
env:
1717
CI: true
18+
ALLOW_FAILURES: ${{ endsWith(matrix.ruby, 'head') }}
1819
strategy:
1920
fail-fast: false
2021
matrix:
@@ -36,5 +37,9 @@ jobs:
3637
- name: Install dependencies
3738
run: bundle install --jobs 4 --retry 3
3839
- name: Run tests
39-
run: bundle exec rspec spec
40-
40+
run: bundle exec rspec spec || $ALLOW_FAILURES
41+
- name: Coveralls GitHub Action
42+
uses: coverallsapp/github-action@v1.1.2
43+
if: "matrix.ruby == '3.0'"
44+
with:
45+
github-token: ${{ secrets.GITHUB_TOKEN }}

.travis.yml

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

Gemfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ group :development, :test do
2222
gem 'sxp', github: "dryruby/sxp.rb", branch: "develop"
2323
gem 'rest-client-components'
2424
gem 'erubis'
25-
gem 'simplecov', platforms: :mri
26-
gem 'coveralls', '~> 0.8', platforms: :mri
25+
gem 'simplecov', '~> 0.21', platforms: :mri
26+
gem 'simplecov-lcov', '~> 0.8', platforms: :mri
27+
gem 'coveralls', platforms: :mri
2728
end

spec/spec_helper.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,18 @@
88

99
begin
1010
require 'simplecov'
11+
require 'simplecov-lcov'
1112
require 'coveralls'
13+
14+
SimpleCov::Formatter::LcovFormatter.config do |config|
15+
#Coveralls is coverage by default/lcov. Send info results
16+
config.report_with_single_file = true
17+
config.single_report_path = 'coverage/lcov.info'
18+
end
19+
1220
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
1321
SimpleCov::Formatter::HTMLFormatter,
14-
Coveralls::SimpleCov::Formatter
22+
SimpleCov::Formatter::LcovFormatter
1523
])
1624
SimpleCov.start do
1725
add_filter "/spec/"

0 commit comments

Comments
 (0)