Wront coverage sum with matrix builds
Summary
I am using a matrix to test our api code against multiple python versions while the frontend code is only checked once. Each reports a coverage, however the calculation is wrong.
It is in fact (py38+py39+py310+py311+py312+node)/6
while it should be [ (py38+py39+py310+py311+py312)/5 + node ]/2
Steps to reproduce
test_api:
parallel:
matrix:
- PYTHON_VERSION: ["3.8", "3.9", "3.10", "3.11", "3.12"]
script:
- pytest --cov ...
coverage: '/TOTAL\s*\d*\s*\d*\s*(\d*%)/'
test_front:
script:
- yarn test ...
coverage: '/All files\s+\|\s+\d+\.\d+\s+\|\s+\d+\.\d+\s+\|\s+\d+\.\d+\s+\|\s+(\d+\.\d+)\s+.*/'
Example Project
What is the current bug behavior?
Coverage numbers are not weighted but equally summed together, which might not make sense
What is the expected correct behavior?
When running tests against several environments but testing the same code, the coverage should be calculated accordingly
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)