mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
improve sonarcloud coverage testing behavior
The sonarcloud job was accidentally altered to use *only* the PLG coverage data, which is incomplete for reasons not yet fully understood. Unfortunately, it wasn't *waiting* for the PLG coverage data to be complete -- the job could start before the PLG coverage ran, which mean that you could get anywhere from a few percent to nearly total code coverage. Also, we want to be sure to cover *both* the PLG and non-PLG coverage data, so we add the non-PLG coverage data. We also factor out the simulacraData package from our PKG_LIST because it appears to be confusing sonarcloud because that package isn't "included in project" or something. Also remove a stray `ls` that was probably part of the original testing/debugging of this.
This commit is contained in:
parent
acbcec54c8
commit
c0b26d5b69
1 changed files with 4 additions and 3 deletions
|
|
@ -129,7 +129,7 @@ run go tests future:
|
|||
retry: 1
|
||||
script:
|
||||
- echo "Running featurebase unit tests..."
|
||||
- PKG_LIST=$(go list ./... | grep -v internal/clustertests | paste -s -d, -)
|
||||
- PKG_LIST=$(go list ./... | grep -Ev 'internal/clustertests|simulacraData' | paste -s -d, -)
|
||||
- go test -timeout=30m -json -coverprofile=coverage.out -covermode=atomic -coverpkg=${PKG_LIST} ./... | tee test-report.out
|
||||
artifacts:
|
||||
paths:
|
||||
|
|
@ -146,7 +146,7 @@ run go tests future plg:
|
|||
retry: 1
|
||||
script:
|
||||
- echo "Running featurebase plg-specific unit tests..."
|
||||
- PKG_LIST=$(go list ./... | grep -v internal/clustertests | paste -s -d, -)
|
||||
- PKG_LIST=$(go list ./... | grep -Ev 'internal/clustertests|simulacraData' | paste -s -d, -)
|
||||
- go test -tags=plg -timeout=30m -coverprofile=coverage-plg.out -covermode=atomic -coverpkg=${PKG_LIST} ./... | tee test-report-plg.out
|
||||
artifacts:
|
||||
paths:
|
||||
|
|
@ -163,8 +163,9 @@ upload to sonarcloud:
|
|||
rules:
|
||||
- if: '$CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"'
|
||||
script:
|
||||
- sonar-scanner -Dsonar.projectKey=molecula_featurebase -Dsonar.organization=molecula -Dsonar.sources=. -Dsonar.host.url=https://sonarcloud.io -Dsonar.go.coverage.reportPaths=coverage-plg.out,results/coverage*.out -Dsonar.go.tests.reportPaths=test-report-plg.out,results/report* -Dsonar.javascript.lcov.reportPaths=lattice/coverage/lcov.info
|
||||
- sonar-scanner -Dsonar.projectKey=molecula_featurebase -Dsonar.organization=molecula -Dsonar.sources=. -Dsonar.host.url=https://sonarcloud.io -Dsonar.go.coverage.reportPaths=coverage*.out,results/coverage*out -Dsonar.go.tests.reportPaths=test-report*.out -Dsonar.javascript.lcov.reportPaths=lattice/coverage/lcov.info
|
||||
needs:
|
||||
- job: run go tests future plg
|
||||
- job: run go tests future
|
||||
- job: run jest tests
|
||||
- job: clustertests
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue