Skip to content

ENH: add sonar configuration #6

ENH: add sonar configuration

ENH: add sonar configuration #6

Workflow file for this run

name: Build
permissions:
contents: read
pull-requests: read
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarQube Cloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Check SONAR_TOKEN
run: echo "SONAR_TOKEN length is ${#SONAR_TOKEN}"
with:

Check failure on line 21 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / Build

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 21, Col: 9): Unexpected value 'with'
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
export_environment_variables: true
- name: Install dependencies
run: yarn
- name: Test and coverage
run: yarn jest --coverage
- name: SonarQube Cloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}