# This workflow helps you trigger a SonarCloud analysis of your code.
# 1. Login to SonarCloud.io using your GitHub account
# 2. Import your project on SonarCloud
# * Add your GitHub organization first, then add your repository as a new project.
# * Please note that your project might be ready for Automatic Analysis, which means that it could be analysed without the need for GitHub Actions (it will be built automatically).
# * This behavior can be changed in Administration > Analysis Method.
#
# 3. Copy/paste the Projet Key and the Organization Key in the args parameter below
# * You'll find those info on SonarCloud. Click on "Information" at the bottom left
# 4. Generate a new token and add it to your Github's repository Secrets with the name SONAR_TOKEN
# * On SonarCloud, click on your avatar on top-right > My account > Security
# Feel free to take a look at our documentation (https://docs.sonarcloud.io/getting-started/github/)
# or reach out to our community forum if you need some help (https://community.sonarsource.com/c/help/sc/9)
GITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN:${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret)
# Comma-separated paths to directories containing test source files.
-Dsonar.tests=# optional. For more info about Code Coverage, please refer to https://docs.sonarcloud.io/enriching/test-coverage/overview/
# Adds more detail to both client and server-side analysis logs, activating DEBUG mode for the scanner, and adding client-side environment variables and system properties to the server-side log of analysis report processing.