mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
616b39a9f0
The scan has been a manual step on somebody's machine, which is why the dashboard could sit on a stale commit without anyone noticing. This runs it on every push to dev. Push to dev only, and that is the point: the instance is Community Edition, so it has no branch or pull-request analysis and the project holds exactly one view. Analysing a feature branch would overwrite that view with the branch's numbers until somebody scanned dev again, so the one branch that may publish is the one everybody reads. The four coverage jobs mirror the ones in test.yml because Sonar needs the lcov each package emits — without it every line reports as uncovered and the dashboard shows a collapse that did not happen. They run in parallel and hand their reports to the scan job, which needs a full clone: Sonar reads git blame to date each issue and to decide what counts as new code. sonar.projectVersion stays pinned here rather than read from package.json. package.json is still on 3.4.1 while the project has been analysed as 4.0.0 all along, and since New Code is "previous version", taking the lower number would silently re-base every new-code metric. Needs two repository secrets before it can run: SONAR_TOKEN and SONAR_HOST_URL.