File tree Expand file tree Collapse file tree 3 files changed +46
-1
lines changed Expand file tree Collapse file tree 3 files changed +46
-1
lines changed Original file line number Diff line number Diff line change 11
11
12
12
build :
13
13
needs : ruby-versions
14
+ permissions :
15
+ contents : read
16
+ checks : write
14
17
name : build (${{ matrix.ruby }} / ${{ matrix.os }})
15
18
strategy :
16
19
matrix :
29
32
rubygems : 3.5.14
30
33
- name : Run test
31
34
run : bundle exec rake test
35
+
36
+ - uses : joshmfrankel/simplecov-check-action@main
37
+ if : matrix.os == 'ubuntu-latest' && github.event_name != 'pull_request'
38
+ with :
39
+ check_job_name : " SimpleCov - ${{ matrix.ruby }}"
40
+ minimum_suite_coverage : 90
41
+ minimum_file_coverage : 40 # TODO: increase this after switching to SASL::AuthenticationExchange
42
+ github_token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -13,4 +13,10 @@ gem "rdoc"
13
13
gem "test-unit"
14
14
gem "test-unit-ruby-core" , git : "https://github.com/ruby/test-unit-ruby-core"
15
15
16
- gem "benchmark-driver"
16
+ gem "benchmark-driver" , require : false
17
+
18
+ group :test do
19
+ gem "simplecov" , require : false
20
+ gem "simplecov-html" , require : false
21
+ gem "simplecov-json" , require : false
22
+ end
Original file line number Diff line number Diff line change
1
+ require "simplecov"
2
+
3
+ # Cannot use ".simplecov" file: simplecov-json triggers a circular require.
4
+ require "simplecov-json"
5
+ SimpleCov . formatters = SimpleCov ::Formatter ::MultiFormatter . new ( [
6
+ SimpleCov ::Formatter ::HTMLFormatter ,
7
+ SimpleCov ::Formatter ::JSONFormatter ,
8
+ ] )
9
+
10
+ SimpleCov . start do
11
+ command_name "Net::IMAP tests"
12
+ enable_coverage :branch
13
+ primary_coverage :branch
14
+ enable_coverage_for_eval
15
+
16
+ add_filter "/test/"
17
+ add_filter "/rakelib/"
18
+
19
+ add_group "Parser" , %w[ lib/net/imap/response_parser.rb
20
+ lib/net/imap/response_parser ]
21
+ add_group "Config" , %w[ lib/net/imap/config.rb
22
+ lib/net/imap/config ]
23
+ add_group "SASL" , %w[ lib/net/imap/sasl.rb
24
+ lib/net/imap/sasl
25
+ lib/net/imap/authenticators.rb ]
26
+ add_group "StringPrep" , %w[ lib/net/imap/stringprep.rb
27
+ lib/net/imap/stringprep ]
28
+ end
1
29
require "test/unit"
2
30
require "core_assertions"
3
31
You can’t perform that action at this time.
0 commit comments