diff --git a/.github/workflows/sonar-scan.yml b/.github/workflows/sonar-scan.yml deleted file mode 100644 index 1320d7ac21d21..0000000000000 --- a/.github/workflows/sonar-scan.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: Sonar Scan -on: - pull_request: - types: [opened, synchronize, closed] - -jobs: - detect-changes: - name: Detect Changed Modules - timeout-minutes: 5 - runs-on: ubuntu-latest - outputs: - changed-modules: ${{ steps.detect-changed-modules.outputs.changed-modules }} - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.9.1 - with: - workflow_id: ${{ github.event.workflow.id }} - - name: Checkout Airbyte - uses: actions/checkout@v2 - with: - fetch-depth: 1000 - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: 3.9 - - name: Install Requirements - run: | - pip install ./tools/ci_common_utils ./tools/ci_code_validator[tests] - pytest ./tools/ci_code_validator - - name: Detect Changed Modules - id: detect-changed-modules - run: | - git fetch - CHANGES=$(ci_changes_detection $(git diff --name-only $(git merge-base HEAD origin/master)) | jq -c .) - echo "::set-output name=changed-modules::{ \"include\": $CHANGES }" - - run-ci-tests: - # Do only run if the PR is not a draft and the changed modules matrix contains at least one entry - if: github.event.pull_request.draft == false && fromJson(needs.detect-changes.outputs.changed-modules).include[0] != null - needs: detect-changes - name: Tests for ${{ matrix.module }} - runs-on: ubuntu-latest - - strategy: - matrix: ${{fromJson(needs.detect-changes.outputs.changed-modules)}} - env: - MODULE_NAME: ${{ matrix.module }} - MODULE_LANG: ${{ matrix.lang }} - MODULE_FOLDER: ${{ matrix.folder }} - ENV_NAME: "github" - - steps: - - name: Print Settings - run: | - echo "Module: ${{ env.MODULE_NAME }}, Lang: ${{ env.MODULE_LANG }}, Folder: ${{ env.MODULE_FOLDER }}" - - name: Checkout Airbyte - if: ${{ env.ENV_NAME == 'github' }} - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Run Tests Runner - id: run-python-tests - uses: ./.github/actions/ci-tests-runner - with: - token: ${{ secrets.GITHUB_TOKEN }} - module-name: ${{ env.MODULE_NAME }} - module-folder: ${{ env.MODULE_FOLDER }} - module-lang: ${{ env.MODULE_LANG }} - sonar-token: ${{ secrets.SONAR_TOKEN }} - sonar-gcp-access-key: ${{ secrets.GCP_SONAR_SA_KEY }} - pull-request-id: "${{ github.repository }}/${{ github.event.pull_request.number }}" - remove-sonar-project: true