diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 5da0f6b1..d40257a0 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -62,6 +62,8 @@ jobs: steps: - uses: actions/checkout@v1 + with: + fetch-depth: 0 - name: Configure host kerberos run: | @@ -78,6 +80,12 @@ jobs: - name: Test with tox run: tox -- --with-kerberos + + - name: SonarCloud 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 }} - name: Upload coverage report uses: codecov/codecov-action@v2 diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 00000000..ffaa483c --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,13 @@ +sonar.projectKey=pyansys-test-openapi-common +sonar.organization=pyansys-test + +# This is the name and version displayed in the SonarCloud UI. +#sonar.projectName=pyansys-test-openapi-common +#sonar.projectVersion=1.0 + +# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. +sonar.sources=./src + +# Encoding of the source code. Default is default system encoding +#sonar.sourceEncoding=UTF-8 +sonar.python.version=3 \ No newline at end of file