File tree Expand file tree Collapse file tree 5 files changed +51
-9
lines changed
Expand file tree Collapse file tree 5 files changed +51
-9
lines changed Original file line number Diff line number Diff line change @@ -9,19 +9,22 @@ name: Ruby
99
1010on :
1111 push :
12+ branches :
13+ - ' **' # run on all branches
14+ tags-ignore :
15+ - ' **' # skip all tags
1216 pull_request_target :
13- types : [opened, reopened]
17+ types : [opened, reopened, synchronize ]
1418
1519jobs :
1620 test :
17-
1821 runs-on : ubuntu-latest
1922 strategy :
2023 fail-fast : false
2124 matrix :
2225 ruby-version : ['3.1']
2326 steps :
24- - uses : actions/checkout@v3
27+ - uses : actions/checkout@v5
2528 - name : Set up Ruby
2629 # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
2730 # change this to (see https://github.com/ruby/setup-ruby#versioning):
3033 ruby-version : ${{ matrix.ruby-version }}
3134 bundler-cache : true # runs 'bundle install' and caches installed gems automatically
3235 - name : set up config file
33- run : cp config/config.test.rb config/config.rb
36+ run : cp config/config.test.rb config/config.rb
3437 - name : Run tests
3538 env :
3639 UT_APIKEY : ${{ secrets.UT_APIKEY }}
3740 run : bundle exec rake test TESTOPTS="-v"
41+ - name : Upload coverage to Codecov
42+ uses : codecov/codecov-action@v5
43+ with :
44+ flags : ${{ matrix.ruby-version }}
45+ verbose : true
Original file line number Diff line number Diff line change 11* .gem
22.DS_Store
3- config /config.rb
3+ / config /config.rb
44
55# Specific to IntelliJ
66.idea /
77
88# Specific to rbenv
9- .ruby-version
9+ .ruby-version
10+
11+ # Codecov local cache
12+ /coverage /
Original file line number Diff line number Diff line change 77gem 'pry'
88gem 'rake'
99gem 'rubocop' , '~> 1.43'
10+ gem "simplecov" , require : false
11+ gem "simplecov-cobertura" , require : false
Original file line number Diff line number Diff line change 3636 coderay (1.1.3 )
3737 concurrent-ruby (1.3.5 )
3838 connection_pool (2.5.4 )
39+ docile (1.4.1 )
3940 drb (2.2.3 )
4041 excon (1.3.1 )
4142 logger
5051 faraday (>= 1 , < 3 )
5152 faraday-multipart (1.1.1 )
5253 multipart-post (~> 2.0 )
53- faraday-net_http (3.4.1 )
54- net-http (>= 0.5.0 )
54+ faraday-net_http (3.4.2 )
55+ net-http (~> 0.5 )
5556 i18n (1.14.7 )
5657 concurrent-ruby (~> 1.0 )
57- json (2.15.2 )
58+ json (2.16.0 )
5859 language_server-protocol (3.17.0.5 )
5960 lint_roller (1.1.0 )
6061 logger (1.7.0 )
8485 rainbow (3.1.1 )
8586 rake (13.3.1 )
8687 regexp_parser (2.11.3 )
88+ rexml (3.4.4 )
8789 rubocop (1.81.7 )
8890 json (~> 2.3 )
8991 language_server-protocol (~> 3.17.0.2 )
100102 prism (~> 1.4 )
101103 ruby-progressbar (1.13.0 )
102104 securerandom (0.4.1 )
105+ simplecov (0.22.0 )
106+ docile (~> 1.1 )
107+ simplecov-html (~> 0.11 )
108+ simplecov_json_formatter (~> 0.1 )
109+ simplecov-cobertura (3.1.0 )
110+ rexml
111+ simplecov (~> 0.19 )
112+ simplecov-html (0.13.2 )
113+ simplecov_json_formatter (0.1.4 )
103114 tzinfo (2.0.6 )
104115 concurrent-ruby (~> 1.0 )
105116 unicode-display_width (3.2.0 )
@@ -119,6 +130,8 @@ DEPENDENCIES
119130 pry
120131 rake
121132 rubocop (~> 1.43 )
133+ simplecov
134+ simplecov-cobertura
122135
123136BUNDLED WITH
124137 2.6.9
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
2+ # Start simplecov if this is a coverage task or if it is run in the CI pipeline
3+ if ENV [ 'COVERAGE' ] || ENV [ 'CI' ]
4+ require 'simplecov'
5+ require 'simplecov-cobertura'
6+
7+ SimpleCov . formatters = SimpleCov ::Formatter ::MultiFormatter . new ( [
8+ SimpleCov ::Formatter ::HTMLFormatter ,
9+ SimpleCov ::Formatter ::CoberturaFormatter , # writes coverage/cobertura.xml
10+ ] )
11+
12+ SimpleCov . start do
13+ enable_coverage :branch
14+ add_filter %w[ /test/ /config/ ]
15+ end
16+ end
17+
218require 'bundler/setup'
319require 'pry'
420require 'minitest/autorun'
You can’t perform that action at this time.
0 commit comments