diff --git a/.github/workflows/test-all-warehouses.yml b/.github/workflows/test-all-warehouses.yml index 0db83777e..6a969c825 100644 --- a/.github/workflows/test-all-warehouses.yml +++ b/.github/workflows/test-all-warehouses.yml @@ -1,5 +1,11 @@ name: Test all warehouse platforms on: + pull_request_target: + branches: ["master"] + paths: + - elementary/** + - .github/** + - pyproject.toml workflow_dispatch: inputs: elementary-ref: @@ -25,13 +31,13 @@ jobs: strategy: fail-fast: false matrix: - dbt-version: ${{ inputs.dbt-version && fromJSON(format('["{0}"]', inputs.dbt-version)) || fromJSON('["1.8.0", null]') }} + dbt-version: ${{ inputs.dbt-version && fromJSON(format('["{0}"]', inputs.dbt-version)) || fromJSON('[null]') }} warehouse-type: [postgres, snowflake, bigquery, redshift, databricks_catalog, athena] uses: ./.github/workflows/test-warehouse.yml with: warehouse-type: ${{ matrix.warehouse-type }} - elementary-ref: ${{ inputs.elementary-ref }} + elementary-ref: ${{ inputs.elementary-ref || (github.event_name == 'pull_request_target' && github.event.pull_request.head.sha) || '' }} dbt-data-reliability-ref: ${{ inputs.dbt-data-reliability-ref }} dbt-version: ${{ matrix.dbt-version }} generate-data: ${{ inputs.generate-data || false }} @@ -45,7 +51,8 @@ jobs: always() && ! cancelled() && ! contains(needs.test.result, 'success') && - ! contains(needs.test.result, 'cancelled') + ! contains(needs.test.result, 'cancelled') && + github.event_name != 'pull_request_target' uses: ./.github/workflows/notify_slack.yml with: result: "failure" diff --git a/.github/workflows/test-main-warehouse.yml b/.github/workflows/test-main-warehouse.yml deleted file mode 100644 index 048443b0f..000000000 --- a/.github/workflows/test-main-warehouse.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Test main warehouse platform -on: - pull_request_target: - branches: ["master"] - paths: - - elementary/** - - .github/** - - pyproject.toml - workflow_dispatch: - -jobs: - test: - uses: ./.github/workflows/test-warehouse.yml - with: - warehouse-type: postgres - elementary-ref: ${{ (github.event_name == 'pull_request_target' && github.event.pull_request.head.sha) || '' }} - secrets: inherit