From ea97d07341f41fa67fcc29c0cd065c2ebf21cd3b Mon Sep 17 00:00:00 2001 From: Dave Shawley Date: Mon, 10 May 2021 07:22:18 -0400 Subject: [PATCH] Switch to manual sonarqube analysis. AFAICT the automatic analysis does not wait for coverage reports to be generated. --- .github/workflows/run-tests.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index bf21fd4..e749d7d 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -15,6 +15,8 @@ jobs: python-version: [3.7, 3.8, 3.9] steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 # sonar wants a "deep" clone - name: Install python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: @@ -42,6 +44,12 @@ jobs: file: ./coverage.xml flags: unittests fail_ci_if_error: true + - name: Run sonarqube scan + if: ${{ matrix.python-version == '3.9' }} + uses: SonarSource/sonarcloud-github-action@v1.3 + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + SONAR_TOKEN: ${{secrets.SONAR_TOKEN}} - name: Save coverage report if: ${{ matrix.python-version == '3.9' }} uses: actions/upload-artifact@v2