diff --git a/.github/workflows/merge-to-main.yml b/.github/workflows-disabled/merge-to-main.yml similarity index 100% rename from .github/workflows/merge-to-main.yml rename to .github/workflows-disabled/merge-to-main.yml diff --git a/.github/workflows/pull-request.yml b/.github/workflows/ci.yml similarity index 64% rename from .github/workflows/pull-request.yml rename to .github/workflows/ci.yml index edc486f..2eec3ec 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,9 @@ name: CI on: + push: + branches: [ main ] pull_request: + types: [opened, synchronize, reopened] paths-ignore: - 'README.md' - 'LICENSE.md' @@ -30,11 +33,18 @@ jobs: run: | coverage run -m py.test -v --junitxml=testresults.xml coverage xml - - uses: sonarsource/sonarqube-scan-action@master + - 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_CLOUD }} + - name: SonarQube Scan + uses: sonarsource/sonarqube-scan-action@master env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - - uses: sonarsource/sonarqube-quality-gate-action@master + - name: SonarQube Quality Gate + uses: sonarsource/sonarqube-quality-gate-action@master timeout-minutes: 5 env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}