Skip to content

Commit

Permalink
chore: debug if coverage files exist when sonar scan starts
Browse files Browse the repository at this point in the history
  • Loading branch information
JBR90 committed Nov 29, 2024
1 parent 19f9a7f commit ebc3c60
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ jobs:
APP_VERSION=$(grep -m 1 -oP '(?<=## \[)\d+\.\d+\.\d+' CHANGE_LOG.md)
echo "version=$APP_VERSION" >> $GITHUB_OUTPUT
- name: Download coverage artifact
uses: actions/download-artifact@v3
with:
name: coverage
path: ./coverage/merged
# Debug step to check if lcov.info files are generated
- name: Debug lcov paths
run: |
echo "Checking for lcov files..."
find . -name "lcov.info" | xargs ls -lah || echo "No lcov files found."
- name: SonarCloud scan
uses: sonarsource/sonarcloud-github-action@master
Expand All @@ -58,4 +58,4 @@ jobs:
with:
args: >
-Dsonar.projectVersion=${{ steps.app-version.outputs.version }}
-Dsonar.javascript.lcov.reportPaths=coverage/merged/lcov.info
-Dsonar.javascript.lcov.reportPaths="apps/nextjs/coverage/lcov.info,packages/aila/coverage/lcov.info,packages/ingest/coverage/lcov.info"
15 changes: 0 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,3 @@ jobs:

- name: Run tests
run: pnpm turbo test --cache-dir=".turbo" -- --maxWorkers=33%

- name: Merge coverage reports
run: |
mkdir -p coverage/merged
lcov --ignore-errors inconsistent --ignore-errors corrupt \
-a apps/nextjs/coverage/lcov.info \
-a packages/aila/coverage/lcov.info \
-a packages/ingest/coverage/lcov.info \
-o coverage/merged/lcov.info
- name: Upload coverage artifact
uses: actions/upload-artifact@v3
with:
name: coverage
path: coverage/merged/lcov.info
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ sonar.cpd.exclusions=\

sonar.tests=.
sonar.test.inclusions=**/*.test.ts
sonar.javascript.lcov.reportPaths=coverage/merged/lcov.info
sonar.javascript.lcov.reportPaths=apps/nextjs/coverage/lcov.info,packages/aila/coverage/lcov.info,packages/ingest/coverage/lcov.info

0 comments on commit ebc3c60

Please sign in to comment.