Skip to content

Commit

Permalink
feat: test only on production
Browse files Browse the repository at this point in the history
  • Loading branch information
JBR90 committed Nov 29, 2024
1 parent ef0a733 commit 88a0d62
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ on:
types: [opened, synchronize, reopened]
merge_group:

workflow_run:
workflows:
- Jest
types:
- completed

jobs:
sonarcloud:
runs-on: ubuntu-latest
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,13 @@ jobs:
- name: Run tests
run: pnpm turbo test --cache-dir=".turbo" -- --maxWorkers=33% --coverage

- name: Debug possible coverage paths
run: |
echo "Searching for coverage files..."
find packages/**/coverage -name "lcov.info" || echo "No coverage files found in packages."
find apps/nextjs/coverage -name "lcov.info" || echo "No coverage files found in apps/nextjs."
# Run only on production branch
- name: Report coverage to SonarCloud
if: ${{ github.event.pull_request.merged == true && github.base_ref == 'production' }}
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.verbose=true
-Dsonar.javascript.lcov.reportPaths=packages/**/coverage/lcov.info,apps/nextjs/coverage/lcov.info

0 comments on commit 88a0d62

Please sign in to comment.