🔧 Readd checking code coverage with Coveralls
This commit is contained in:
parent
8131c94c8b
commit
bf804cb5f3
|
@ -0,0 +1 @@
|
|||
service_name: github-ci
|
|
@ -0,0 +1,28 @@
|
|||
name: coverage
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
coverage:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install BLAS and LAPACK
|
||||
run: sudo apt-get install -y libopenblas-dev liblapacke-dev
|
||||
- name: Set up Ruby 2.7
|
||||
uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '2.7'
|
||||
- name: Build and test with Rake
|
||||
run: |
|
||||
gem install bundler
|
||||
bundle install
|
||||
bundle exec rake
|
||||
- name: Coveralls GitHub Action
|
||||
uses: coverallsapp/github-action@v1.1.2
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
3
Gemfile
3
Gemfile
|
@ -13,4 +13,5 @@ gem 'rubocop', '~> 1.0'
|
|||
gem 'rubocop-performance', '~> 1.8'
|
||||
gem 'rubocop-rake', '~> 0.5'
|
||||
gem 'rubocop-rspec', '~> 2.0'
|
||||
gem 'simplecov', '~> 0.19'
|
||||
gem 'simplecov', '~> 0.21'
|
||||
gem 'simplecov-lcov', '~> 0.8'
|
||||
|
|
|
@ -1,9 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'pp'
|
||||
require 'simplecov'
|
||||
require 'simplecov-lcov'
|
||||
|
||||
SimpleCov::Formatter::LcovFormatter.config do |config|
|
||||
config.report_with_single_file = true
|
||||
config.single_report_path = 'coverage/lcov.info'
|
||||
end
|
||||
|
||||
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
|
||||
[SimpleCov::Formatter::HTMLFormatter, SimpleCov::Formatter::LcovFormatter]
|
||||
)
|
||||
|
||||
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([SimpleCov::Formatter::HTMLFormatter])
|
||||
SimpleCov.start
|
||||
|
||||
require 'bundler/setup'
|
||||
|
|
Loading…
Reference in New Issue