Files
QuanTAlib/.github/workflows/sonarcloud.yml
T
2024-08-05 14:22:41 -07:00

31 lines
983 B
YAML

name: SonarCloud analysis
on:
push:
pull_request:
workflow_dispatch:
permissions:
pull-requests: read # allows SonarCloud to decorate PRs with analysis results
jobs:
Analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Analyze with SonarCloud
uses: SonarSource/sonarcloud-github-action@v2.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN
with:
# Additional arguments for the SonarScanner CLI
args: >
-Dsonar.projectKey=your_project_key_here
-Dsonar.organization=your_organization_here
-Dsonar.sources=.
-Dsonar.verbose=false