This repository was archived by the owner on Sep 5, 2024. It is now read-only.
Commit ed6d1d6 1 parent 2ead518 commit ed6d1d6 Copy full SHA for ed6d1d6
File tree 5 files changed +57
-0
lines changed
5 files changed +57
-0
lines changed Original file line number Diff line number Diff line change 25
25
bundler-cache : true # runs 'bundle install' and caches installed gems automatically
26
26
- name : Run Tests
27
27
env :
28
+ COVERAGE : true
28
29
RUBYOPT : " -W:deprecated"
29
30
run : bundle exec rake
31
+ - name : Rename coverage file by matrix run
32
+ run : mv coverage/coverage.xml coverage/coverage-ruby-${{ matrix.ruby }}.xml
33
+ - uses : actions/upload-artifact@v4
34
+ with :
35
+ name : coverage-ruby-${{ matrix.ruby }}
36
+ path : coverage
37
+ if-no-files-found : error
38
+
39
+ upload_coverage :
40
+ name : Upload Coverage
41
+ runs-on : ubuntu-latest
42
+ needs : [build]
43
+ steps :
44
+ - uses : actions/checkout@v4
45
+ - uses : actions/download-artifact@v4
46
+ with :
47
+ path : coverage
48
+ pattern : coverage-ruby-*
49
+ merge-multiple : true
50
+ - uses : codecov/codecov-action@v4
51
+ with :
52
+ token : ${{ secrets.CODECOV_TOKEN }}
53
+ directory : coverage
54
+ fail_ci_if_error : true
Original file line number Diff line number Diff line change @@ -2,3 +2,8 @@ source 'https://rubygems.org'
2
2
3
3
# Specify your gem's dependencies in envied.gemspec
4
4
gemspec
5
+
6
+ group :test do
7
+ gem "simplecov" , require : false
8
+ gem "simplecov-cobertura"
9
+ end
Original file line number Diff line number Diff line change 7
7
remote: https://rubygems.org/
8
8
specs:
9
9
diff-lcs (1.5.1 )
10
+ docile (1.4.0 )
10
11
rake (13.2.1 )
12
+ rexml (3.2.6 )
11
13
rspec (3.13.0 )
12
14
rspec-core (~> 3.13.0 )
13
15
rspec-expectations (~> 3.13.0 )
21
23
diff-lcs (>= 1.2.0 , < 2.0 )
22
24
rspec-support (~> 3.13.0 )
23
25
rspec-support (3.13.1 )
26
+ simplecov (0.22.0 )
27
+ docile (~> 1.1 )
28
+ simplecov-html (~> 0.11 )
29
+ simplecov_json_formatter (~> 0.1 )
30
+ simplecov-cobertura (2.1.0 )
31
+ rexml
32
+ simplecov (~> 0.19 )
33
+ simplecov-html (0.12.3 )
34
+ simplecov_json_formatter (0.1.4 )
24
35
25
36
PLATFORMS
26
37
ruby
@@ -30,6 +41,8 @@ DEPENDENCIES
30
41
envied !
31
42
rake (~> 13.0 )
32
43
rspec (~> 3.0 )
44
+ simplecov
45
+ simplecov-cobertura
33
46
34
47
BUNDLED WITH
35
48
2.3.10
Original file line number Diff line number Diff line change
1
+ coverage :
2
+ status :
3
+ project :
4
+ default :
5
+ threshold : 0.05%
Original file line number Diff line number Diff line change
1
+ if ENV . fetch ( "COVERAGE" , false )
2
+ require "simplecov"
3
+ require "simplecov-cobertura"
4
+ SimpleCov . start do
5
+ add_filter %r{^/spec/}
6
+ formatter SimpleCov ::Formatter ::CoberturaFormatter
7
+ end
8
+ end
9
+
1
10
require "bundler/setup"
2
11
require "envied"
3
12
You can’t perform that action at this time.
0 commit comments