voxpupuli / modulesync

Synchronize common files across your Git repositories.
Apache License 2.0
104 stars 48 forks source link

Add behavior tests to CI #239

Closed neomilium closed 3 years ago

neomilium commented 3 years ago

Fixes #236

codecov[bot] commented 3 years ago

Codecov Report

Merging #239 (e31bed0) into master (98fe295) will increase coverage by 78.11%. The diff coverage is 50.00%.

:exclamation: Current head e31bed0 differs from pull request most recent head 68b7578. Consider uploading reports for the commit 68b7578 to get more accurate results Impacted file tree graph

@@             Coverage Diff             @@
##           master     #239       +/-   ##
===========================================
+ Coverage    6.02%   84.13%   +78.11%     
===========================================
  Files          17       30       +13     
  Lines         846      889       +43     
===========================================
+ Hits           51      748      +697     
+ Misses        795      141      -654     
Impacted Files Coverage Δ
spec/spec_helper.rb 0.00% <0.00%> (ø)
spec/unit/modulesync/git_service_spec.rb 100.00% <100.00%> (ø)
spec/unit/modulesync/git_service/gitlab_spec.rb 100.00% <0.00%> (ø)
spec/helpers/faker.rb 100.00% <0.00%> (ø)
spec/unit/modulesync/git_service/github_spec.rb 0.00% <0.00%> (ø)
features/step_definitions/git_steps.rb 94.87% <0.00%> (ø)
spec/unit/modulesync/settings_spec.rb 100.00% <0.00%> (ø)
spec/unit/modulesync/source_code_spec.rb 100.00% <0.00%> (ø)
spec/helpers/faker/puppet_module_remote_repo.rb 85.71% <0.00%> (ø)
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 98fe295...68b7578. Read the comment docs.

neomilium commented 3 years ago

I do not understand where codecov found 47,36% (-4,99%) as this PR raises code coverage to 93.57% (cf. https://github.com/voxpupuli/modulesync/pull/239/checks?check_run_id=3819493731#step:5:1142)

smortex commented 3 years ago

The code coverage seems to include the code in the vendor directory, i.e. all dependencies :unamused:

image

neomilium commented 3 years ago

I'm looking for a way to merge cucumber and rspec code coverages before upload to codecov, any help appreciated.

Currently code coverage is enable anywhere (ie. all CI checks run simplecov) and upload to codecov is enabled only with ruby 3.0.

neomilium commented 3 years ago

@smortex .simplecov file explicitly exclude '/vendor/' and '/.vendor', any ideas?

neomilium commented 3 years ago

OK, its working, will improve code after #219

bastelfreak commented 3 years ago

@neomilium should we merge this before #219 ?

neomilium commented 3 years ago

@bastelfreak This PR comes after #219 . If needed, it can be reworked to be merged before but IMHO, it easier to merge #219 then rebase this one on top of main branch.