Skip to content

Commit

Permalink
Address comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
plypaul committed Jun 6, 2024
1 parent fa30148 commit 8ef3257
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/cd-sql-engine-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@ name: MetricFlow SQL Engine Tests

on:
workflow_dispatch:

pull_request:
types: [labeled]

env:
PYTHON_VERSION: "3.8"
EXTERNAL_ENGINE_TEST_PARALLELISM: 8
ADDITIONAL_PYTEST_OPTIONS: "--use-persistent-source-schema"

jobs:
snowflake-tests:
environment: DW_INTEGRATION_TESTS
if: ${{ github.event.label.name == 'Run Tests With Other SQL Engines' }}
# Run if manually triggered. Example case: run against `main` to check if something is broken.
# Run if a PR is given a specific label.
if: ${{ github.event.action != 'labeled' || github.event.label.name == 'Run Tests With Other SQL Engines' }}
name: Snowflake Tests
runs-on: ubuntu-latest
steps:
Expand All @@ -35,7 +37,7 @@ jobs:
redshift-tests:
environment: DW_INTEGRATION_TESTS
name: Redshift Tests
if: ${{ github.event.label.name == 'Run Tests With Other SQL Engines' }}
if: ${{ github.event.action != 'labeled' || github.event.label.name == 'Run Tests With Other SQL Engines' }}
runs-on: ubuntu-latest
steps:
- name: Check-out the repo
Expand All @@ -53,7 +55,7 @@ jobs:
bigquery-tests:
environment: DW_INTEGRATION_TESTS
name: BigQuery Tests
if: ${{ github.event.label.name == 'Run Tests With Other SQL Engines' }}
if: ${{ github.event.action != 'labeled' || github.event.label.name == 'Run Tests With Other SQL Engines' }}
runs-on: ubuntu-latest
steps:
- name: Check-out the repo
Expand All @@ -72,7 +74,7 @@ jobs:
databricks-tests:
environment: DW_INTEGRATION_TESTS
name: Databricks Tests
if: ${{ github.event.label.name == 'Run Tests With Other SQL Engines' }}
if: ${{ github.event.action != 'labeled' || github.event.label.name == 'Run Tests With Other SQL Engines' }}
runs-on: ubuntu-latest
steps:
- name: Check-out the repo
Expand All @@ -94,7 +96,7 @@ jobs:
# we may choose to execute them against a hosted instance, at which point this config will look like the other
# engine configs in this file.
name: Trino Tests
if: ${{ github.event.label.name == 'Run Tests With Other SQL Engines' }}
if: ${{ github.event.action != 'labeled' || github.event.label.name == 'Run Tests With Other SQL Engines' }}
runs-on: ubuntu-latest
services:
trino:
Expand All @@ -116,7 +118,7 @@ jobs:
runs-on: ubuntu-latest
needs: [ snowflake-tests, redshift-tests, bigquery-tests, databricks-tests ]
# Default behavior for `needs` is that it requires success. `always()` runs this action even if tests fail.
if: ${{ always() }}
if: ${{ github.event.action == 'labeled' }}
steps:
- name: Remove Label
uses: actions-ecosystem/action-remove-labels@v1
Expand Down

0 comments on commit 8ef3257

Please sign in to comment.