Skip to content

Commit

Permalink
try matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinnnyshinshin committed Aug 17, 2021
1 parent ced8994 commit c25846d
Showing 1 changed file with 58 additions and 52 deletions.
110 changes: 58 additions & 52 deletions azure-pipelines-cloud-db-integration.yml
Expand Up @@ -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
Expand All @@ -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'
#

0 comments on commit c25846d

Please sign in to comment.