Skip to content

Commit b3ea202

Browse files
authored
feat(ci): add codecov checks for idlc (#852)
This is this initial PR; after this merges with main, we should start seeing coverage status checks on subsequent PRs. Initially, this has the following thresholds: - No more than a 1% drop in coverage overall. - At least 90% coverage on any new code in a patch
1 parent a74cd0f commit b3ea202

25 files changed

+2078
-1369
lines changed

.github/workflows/regress.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ jobs:
4040
uses: ./.github/actions/singularity-setup
4141
- name: Run smoke
4242
run: ./do test:smoke
43+
- name: Upload idlc coverage reports to Codecov
44+
uses: codecov/codecov-action@v5
45+
with:
46+
token: ${{ secrets.CODECOV_TOKEN }}
47+
disable_search: true
48+
files: tools/ruby-gems/idlc/coverage/coverage.xml
49+
flags: idlc
4350
regress-gen-isa-manual:
4451
runs-on: ubuntu-latest
4552
env:

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,5 @@ end
4747
group :development, :test do
4848
gem "minitest"
4949
gem "simplecov"
50+
gem "simplecov-cobertura"
5051
end

Gemfile.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ GEM
233233
docile (~> 1.1)
234234
simplecov-html (~> 0.11)
235235
simplecov_json_formatter (~> 0.1)
236+
simplecov-cobertura (2.1.0)
237+
rexml
238+
simplecov (~> 0.19)
236239
simplecov-html (0.13.1)
237240
simplecov_json_formatter (0.1.4)
238241
simpleidn (0.2.3)
@@ -331,6 +334,7 @@ DEPENDENCIES
331334
ruby-prof
332335
ruby-progressbar (~> 1.13)
333336
simplecov
337+
simplecov-cobertura
334338
solargraph
335339
sorbet
336340
sorbet-runtime

codecov.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
2+
# SPDX-License-Identifier: BSD-3-Clause-Clear
3+
4+
flag_management:
5+
default_rules: # the rules that will be followed for any flag added, generally
6+
carryforward: true
7+
statuses:
8+
- type: project
9+
target: auto
10+
threshold: 1%
11+
- type: patch
12+
target: 90%

tools/ruby-gems/idlc/Gemfile.lock

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,27 +52,26 @@ GEM
5252
racc (1.8.1)
5353
rack (3.1.16)
5454
rainbow (3.1.1)
55-
rbi (0.3.3)
55+
rbi (0.3.6)
5656
prism (~> 1.0)
5757
rbs (>= 3.4.4)
58-
sorbet-runtime (>= 0.5.9204)
5958
rbs (3.9.4)
6059
logger
6160
regexp_parser (2.10.0)
6261
rexml (3.4.1)
6362
rouge (4.5.2)
64-
rubocop (1.76.0)
63+
rubocop (1.76.2)
6564
json (~> 2.3)
6665
language_server-protocol (~> 3.17.0.2)
6766
lint_roller (~> 1.1.0)
6867
parallel (~> 1.10)
6968
parser (>= 3.3.0.2)
7069
rainbow (>= 2.2.2, < 4.0)
7170
regexp_parser (>= 2.9.3, < 3.0)
72-
rubocop-ast (>= 1.45.0, < 2.0)
71+
rubocop-ast (>= 1.45.1, < 2.0)
7372
ruby-progressbar (~> 1.7)
7473
unicode-display_width (>= 2.4.0, < 4.0)
75-
rubocop-ast (1.45.0)
74+
rubocop-ast (1.45.1)
7675
parser (>= 3.3.7.2)
7776
prism (~> 1.4)
7877
rubocop-github (0.26.0)
@@ -93,7 +92,7 @@ GEM
9392
rack (>= 1.1)
9493
rubocop (>= 1.75.0, < 2.0)
9594
rubocop-ast (>= 1.44.0, < 2.0)
96-
rubocop-sorbet (0.10.2)
95+
rubocop-sorbet (0.10.4)
9796
lint_roller
9897
rubocop (>= 1.75.2)
9998
ruby-progressbar (1.13.0)
@@ -102,16 +101,19 @@ GEM
102101
docile (~> 1.1)
103102
simplecov-html (~> 0.11)
104103
simplecov_json_formatter (~> 0.1)
104+
simplecov-cobertura (2.1.0)
105+
rexml
106+
simplecov (~> 0.19)
105107
simplecov-html (0.13.1)
106108
simplecov_json_formatter (0.1.4)
107-
sorbet (0.5.12157)
108-
sorbet-static (= 0.5.12157)
109-
sorbet-runtime (0.5.12157)
110-
sorbet-static (0.5.12157-aarch64-linux)
111-
sorbet-static (0.5.12157-x86_64-linux)
112-
sorbet-static-and-runtime (0.5.12157)
113-
sorbet (= 0.5.12157)
114-
sorbet-runtime (= 0.5.12157)
109+
sorbet (0.5.12189)
110+
sorbet-static (= 0.5.12189)
111+
sorbet-runtime (0.5.12189)
112+
sorbet-static (0.5.12189-aarch64-linux)
113+
sorbet-static (0.5.12189-x86_64-linux)
114+
sorbet-static-and-runtime (0.5.12189)
115+
sorbet (= 0.5.12189)
116+
sorbet-runtime (= 0.5.12189)
115117
spoom (1.6.3)
116118
erubi (>= 1.10.0)
117119
prism (>= 0.28.0)
@@ -156,6 +158,7 @@ DEPENDENCIES
156158
rubocop-performance
157159
rubocop-sorbet
158160
simplecov
161+
simplecov-cobertura
159162
sorbet
160163
tapioca
161164
yard

tools/ruby-gems/idlc/Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace :chore do
2020
task :update_deps do
2121
ENV["BUNDLE_APP_CONFIG"] = ($root / ".bundle").to_s
2222
Dir.chdir(IDLC_ROOT) do
23-
sh "bundle install --gemfile #{IDLC_ROOT}/Gemfile"
23+
sh "bundle update --gemfile #{IDLC_ROOT}/Gemfile"
2424
sh "bundle exec --gemfile #{IDLC_ROOT}/Gemfile tapioca gems --all"
2525
sh "bundle exec --gemfile #{IDLC_ROOT}/Gemfile tapioca dsl"
2626
sh "bundle exec --gemfile #{IDLC_ROOT}/Gemfile tapioca annotations"

tools/ruby-gems/idlc/idlc.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Gem::Specification.new do |s|
4444
s.add_development_dependency "rubocop-performance"
4545
s.add_development_dependency "rubocop-sorbet"
4646
s.add_development_dependency "simplecov"
47+
s.add_development_dependency "simplecov-cobertura"
4748
s.add_development_dependency "sorbet"
4849
s.add_development_dependency "tapioca"
4950
s.add_development_dependency "yard"

tools/ruby-gems/idlc/sorbet/config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
--dir
22
.
3-
--ignore=tmp/
4-
--ignore=vendor/
3+
--ignore
4+
ext/

0 commit comments

Comments
 (0)