From c25846d860bab7473e2514cc9b3b282579c9a434 Mon Sep 17 00:00:00 2001 From: Shinnnyshinshin Date: Mon, 16 Aug 2021 20:34:37 -0700 Subject: [PATCH] try matrix --- azure-pipelines-cloud-db-integration.yml | 110 ++++++++++++----------- 1 file changed, 58 insertions(+), 52 deletions(-) diff --git a/azure-pipelines-cloud-db-integration.yml b/azure-pipelines-cloud-db-integration.yml index 2c65ebc3cc78..8f9db737fadf 100644 --- a/azure-pipelines-cloud-db-integration.yml +++ b/azure-pipelines-cloud-db-integration.yml @@ -4,11 +4,34 @@ stages: vmImage: 'ubuntu-latest' jobs: - - job: bigquery_expectations_cfe + - job: bigquery_expectations_tests timeoutInMinutes: 0 # Maximize the time that pipelines remain open (6 hours currently) variables: python.version: '3.8' + strategy: + matrix: + bigquery_expectations_cfe: + script: | + pip install pytest pytest-azurepipelines + pytest -v --no-spark --no-postgresql --bigquery --napoleon-docstrings --junitxml=junit/test-results.xml --cov=. --cov-report=xml --cov-report=html --ignore=tests/cli --ignore=tests/integration/usage_statistics tests/test_definitions/test_expectations_cfe.py + displayName: 'pytest' + env: + GOOGLE_APPLICATION_CREDENTIALS: $(gcp_authkey.secureFilePath) + GCP_PROJECT: $(GCP_PROJECT) + GCP_BIGQUERY_DATASET: $(GCP_BIGQUERY_DATASET) + + bigquery_expectations: + script: | + pip install pytest pytest-azurepipelines + pytest -v --no-spark --no-postgresql --bigquery --napoleon-docstrings --junitxml=junit/test-results.xml --cov=. --cov-report=xml --cov-report=html --ignore=tests/cli --ignore=tests/integration/usage_statistics tests/test_definitions/test_expectations.py + displayName: 'pytest' + env: + GOOGLE_APPLICATION_CREDENTIALS: $(gcp_authkey.secureFilePath) + GCP_PROJECT: $(GCP_PROJECT) + GCP_BIGQUERY_DATASET: $(GCP_BIGQUERY_DATASET) + + maxParallel: 1 # so the tests run sequentially steps: # displayName: Delay for BigQuery rate limit @@ -33,55 +56,38 @@ stages: secureFile: 'superconductive-service-acct.json' retryCount: '2' - - script: | - pip install pytest pytest-azurepipelines - pytest -v --no-spark --no-postgresql --bigquery --napoleon-docstrings --junitxml=junit/test-results.xml --cov=. --cov-report=xml --cov-report=html --ignore=tests/cli --ignore=tests/integration/usage_statistics tests/test_definitions/test_expectations_cfe.py - - displayName: 'pytest' - env: - GOOGLE_APPLICATION_CREDENTIALS: $(gcp_authkey.secureFilePath) - GCP_PROJECT: $(GCP_PROJECT) - GCP_BIGQUERY_DATASET: $(GCP_BIGQUERY_DATASET) - - - stage: cloud_db_integration_expectations - pool: - vmImage: 'ubuntu-latest' - - dependsOn: [cloud_db_integration_expectations_cfe] - jobs: - - job: bigquery_expectations - timeoutInMinutes: 0 # Maximize the time that pipelines remain open (6 hours currently) - - variables: - python.version: '3.8' - - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - displayName: 'Use Python $(python.version)' - - - bash: python -m pip install --upgrade pip==20.2.4 - displayName: 'Update pip' - - - script: | - pip install -r requirements-dev.txt - - displayName: 'Install dependencies' - - - task: DownloadSecureFile@1 - name: gcp_authkey - displayName: 'Download Google Service Account' - inputs: - secureFile: 'superconductive-service-acct.json' - retryCount: '2' - - - script: | - pip install pytest pytest-azurepipelines - pytest -v --no-spark --no-postgresql --bigquery --napoleon-docstrings --junitxml=junit/test-results.xml --cov=. --cov-report=xml --cov-report=html --ignore=tests/cli --ignore=tests/integration/usage_statistics tests/test_definitions/test_expectations.py - displayName: 'pytest' - env: - GOOGLE_APPLICATION_CREDENTIALS: $(gcp_authkey.secureFilePath) - GCP_PROJECT: $(GCP_PROJECT) - GCP_BIGQUERY_DATASET: $(GCP_BIGQUERY_DATASET) +# +# - stage: cloud_db_integration_expectations +# pool: +# vmImage: 'ubuntu-latest' +# +# dependsOn: [cloud_db_integration_expectations_cfe] +# jobs: +# - job: bigquery_expectations +# timeoutInMinutes: 0 # Maximize the time that pipelines remain open (6 hours currently) +# +# variables: +# python.version: '3.8' +# +# steps: +# - task: UsePythonVersion@0 +# inputs: +# versionSpec: '$(python.version)' +# displayName: 'Use Python $(python.version)' +# +# - bash: python -m pip install --upgrade pip==20.2.4 +# displayName: 'Update pip' +# +# - script: | +# pip install -r requirements-dev.txt +# +# displayName: 'Install dependencies' +# +# - task: DownloadSecureFile@1 +# name: gcp_authkey +# displayName: 'Download Google Service Account' +# inputs: +# secureFile: 'superconductive-service-acct.json' +# retryCount: '2' +#