Skip to content

Merge pull request #1181 from internxt/feat/PB-6907-protect-pending-a… #4103

Merge pull request #1181 from internxt/feat/PB-6907-protect-pending-a…

Merge pull request #1181 from internxt/feat/PB-6907-protect-pending-a… #4103

name: SonarCloud code analysis
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Test and coverage
run: npm run test:cov
- name: SonarCloud Scan
uses: SonarSource/sonarqube-scan-action@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}