From e4a34a3b0c3fa34113fa42d2147ddcddbc1354cf Mon Sep 17 00:00:00 2001 From: Doug Addy Date: Wed, 23 Feb 2022 10:31:33 +0000 Subject: [PATCH 1/3] Update ci_cd.yml --- .github/workflows/ci_cd.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 5da0f6b1..366971ad 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -96,6 +96,12 @@ jobs: uses: actions/setup-python@v2 with: python-version: '3.10' + + - 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: Install kerberos headers run: sudo apt install libkrb5-dev From e8ca900ac5e881bdcf1c594e8d7304f17ce45b4c Mon Sep 17 00:00:00 2001 From: Doug Addy Date: Wed, 23 Feb 2022 10:37:00 +0000 Subject: [PATCH 2/3] Add sonar-project.properties file --- sonar-project.properties | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 00000000..cd9816b4 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,12 @@ +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 \ No newline at end of file From c6062fdadbdb6479c467eacc83752e645af3cbee Mon Sep 17 00:00:00 2001 From: Doug Addy Date: Wed, 23 Feb 2022 10:43:57 +0000 Subject: [PATCH 3/3] Update sonar configuration --- .github/workflows/ci_cd.yml | 14 ++++++++------ sonar-project.properties | 3 ++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 366971ad..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 @@ -96,12 +104,6 @@ jobs: uses: actions/setup-python@v2 with: python-version: '3.10' - - - 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: Install kerberos headers run: sudo apt install libkrb5-dev diff --git a/sonar-project.properties b/sonar-project.properties index cd9816b4..ffaa483c 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -9,4 +9,5 @@ sonar.organization=pyansys-test sonar.sources=./src # Encoding of the source code. Default is default system encoding -#sonar.sourceEncoding=UTF-8 \ No newline at end of file +#sonar.sourceEncoding=UTF-8 +sonar.python.version=3 \ No newline at end of file