From 63e2c1f0b2d6b9231877f25fd26d90a627d194d0 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sun, 9 Mar 2025 18:20:14 +0000 Subject: [PATCH] Update Coveralls GitHub Actions integration Co-Authored-By: sugi-devin@nemui.org --- .github/workflows/ci.yml | 13 +++++++++++++ Gemfile | 1 + README.md | 4 ++-- spec/spec_helper.rb | 10 ++++++++-- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83b6060..6585980 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,16 @@ jobs: - '3.3.7' - '3.4.2' - 'head' + finish: + needs: test + if: ${{ always() }} + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel-finished: true steps: - uses: actions/checkout@v4 @@ -36,3 +46,6 @@ jobs: uses: coverallsapp/github-action@v2 with: github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: ./coverage/lcov.info + flag-name: ruby-${{ matrix.ruby-version }} + parallel: true diff --git a/Gemfile b/Gemfile index 102c555..daadf0c 100644 --- a/Gemfile +++ b/Gemfile @@ -5,6 +5,7 @@ source 'https://rubygems.org' gemspec gem 'bundler', '>= 1.9' gem 'coveralls_reborn', require: false +gem 'simplecov-lcov', require: false gem 'rake', '>= 10.0' gem 'rake-hooks' gem 'rspec' diff --git a/README.md b/README.md index 8cd14dd..41f379b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # wareki - ruby 和暦ライブラリ [Gem Version](https://badge.fury.io/rb/wareki) -[Build Status](https://travis-ci.org/sugi/wareki) -[Coverage Status](https://coveralls.io/github/sugi/wareki?branch=master) +[Build Status](https://github.com/sugi/wareki/actions/workflows/ci.yml) +[Coverage Status](https://coveralls.io/github/sugi/wareki?branch=master) [](https://codeclimate.com/github/sugi/wareki/maintainability) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/9242ddf1725c404aac2d9f82b9bc1d75)](https://www.codacy.com/app/sugi/wareki?utm_source=github.com&utm_medium=referral&utm_content=sugi/wareki&utm_campaign=Badge_Grade) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 579643e..a43441a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -3,10 +3,16 @@ unless defined? JRUBY_VERSION require 'simplecov' require 'coveralls' - + require 'simplecov-lcov' + + SimpleCov::Formatter::LcovFormatter.config do |c| + c.report_with_single_file = true + c.single_report_path = 'coverage/lcov.info' + end SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([ SimpleCov::Formatter::HTMLFormatter, - Coveralls::SimpleCov::Formatter + Coveralls::SimpleCov::Formatter, + SimpleCov::Formatter::LcovFormatter ]) SimpleCov.start do add_filter 'build-util/'