Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update Wikibase from branch 'master' to a00815c9502b58389714fa9f903504e00216606e - Merge "bridge: wire up with sonar" - bridge: wire up with sonar Allow sonar to access the bridge coverage. Apparently codehealth jobs invoke `--if-present test:unit`, not the complete `test` script, so redirect this script to bridge as well. See https://sonarcloud.io/documentation/analysis/coverage/#test-execution https://www.npmjs.com/package/jest-sonar-reporter In order to run coverage only for this codehealth job and to not have that overhead in the normal CI, an extra specialised script is added to the data-bridge package.json. The jest coverage creates absolute paths in lcov.info. However, the tests are run in a docker-container whereas the analysis is performed outside of it and therefore the paths don't match. Since an option to create relative paths in lcov.info is not yet available[0], this uses sed to manually make the paths relative. Also, it seems that collecting coverage is only really useful for unit tests and so the coverage related configuration has been moved there. This patch tries to use the multi module functionality of sonar in order to split up the sonar configuration. It seems promising so far, but whether it really works as intended can probably only be seen after it has been merged into master. [0]: gotwarlost/istanbul#771 [1]: https://docs.sonarqube.org/display/SONARQUBE51/Analyzing+with+SonarQube+Runner#AnalyzingwithSonarQubeRunner-Multi-moduleProject Change-Id: Ic2954e35c7c053eae1ba958751334dc23d2f3f3a
- Loading branch information