Skip to content

fix condition sonor #630

fix condition sonor

fix condition sonor #630

Workflow file for this run

name: Pogues Test CI
on:
push:
branches:
- '**'
jobs:
test-build:
name: Test & build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: yarn
- run: yarn test:coverage
- run: yarn build
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage/
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: build
path: dist/
sonarcloud:
name: SonarCloud Analysis
runs-on: ubuntu-latest
needs: test-build # Ensure SonarCloud job runs after the test-build job
if: ${{ github.event_name == 'pull_request' }} # Only run SonarCloud on pull requests
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download coverage artifact
uses: actions/download-artifact@v4
with:
name: coverage
path: coverage
- name: SonarCloud Scan
uses: sonarsource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
-Dsonar.pullrequest.branch=${{ github.head_ref }}
-Dsonar.pullrequest.base=${{ github.base_ref }}