File tree 3 files changed +28
-5
lines changed
3 files changed +28
-5
lines changed Original file line number Diff line number Diff line change @@ -47,20 +47,33 @@ jobs:
47
47
with :
48
48
ruby-version : " ${{ matrix.ruby }}"
49
49
bundler-cache : true
50
- - run : NO_COVERAGE=true bundle exec rake spec
50
+ - run : bundle exec rake spec
51
51
env :
52
52
PARSER_ENGINE : ${{ matrix.parser_engine }}
53
+ - name : Upload Coverage Artifact
54
+ uses : actions/upload-artifact@v4
55
+ with :
56
+ name : coverage-ubuntu-${{ matrix.ruby }}-${{ matrix.parser_engine }}
57
+ path : coverage/.resultset.json
58
+ include-hidden-files : true
53
59
54
60
coverage :
61
+ name : Check Coverage
62
+ needs : main
55
63
runs-on : ubuntu-latest
56
- name : " Test coverage "
64
+
57
65
steps :
58
66
- uses : actions/checkout@v4
67
+ - uses : actions/download-artifact@v4
68
+ name : Download Coverage Artifacts
69
+ with :
70
+ pattern : coverage-*
59
71
- uses : ruby/setup-ruby@v1
60
72
with :
61
- ruby-version : " 3.4 "
73
+ ruby-version : ruby # Latest stable CRuby version
62
74
bundler-cache : true
63
- - run : bundle exec rake spec
75
+
76
+ - run : bundle exec rake coverage:ci
64
77
65
78
edge-rubocop :
66
79
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 3
3
require 'rubocop'
4
4
require 'rubocop/rspec/support'
5
5
6
- require 'simplecov' unless ENV [ 'NO_COVERAGE' ]
6
+ require 'simplecov' unless ENV [ 'NO_COVERAGE' ] || RUBY_ENGINE == 'jruby'
7
7
8
8
module SpecHelper
9
9
ROOT = Pathname . new ( __dir__ ) . parent . freeze
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ namespace :coverage do
4
+ desc 'Report Coverage from merged CI runs'
5
+ task :ci do
6
+ require 'simplecov'
7
+
8
+ SimpleCov . collate Dir [ 'coverage-*/.resultset.json' ]
9
+ end
10
+ end
You can’t perform that action at this time.
0 commit comments