forked from great-expectations/great_expectations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-cloud-integration.yml
50 lines (45 loc) · 1.9 KB
/
azure-pipelines-cloud-integration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# This pipeline is responsible for verifying the great expectations open source and cloud integration.
schedules:
- cron: 0 */3 * * *
displayName: Scheduled Runs
branches:
include:
- develop
always: true # This will always trigger because the cloud codebase may have changed.
# The pipeline is run under two primary conditions: scheduled by the above cron job or manually run
variables:
isScheduled: $[and(eq(variables['Build.SourceBranch'], 'refs/heads/develop'), eq(variables['Build.Reason'], 'Schedule'))]
isManual: $[eq(variables['Build.Reason'], 'Manual')]
stages:
- stage: cloud_integration_tests
pool:
vmImage: ubuntu-latest
jobs:
- job: cloud_integration_tests
condition: or(eq(variables.isScheduled, true), eq(variables.isManual, true))
strategy:
matrix:
Python37:
python.version: '3.7'
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
steps:
- bash: |
TAG="greatexpectations:py$(python.version)"
BUILD="docker buildx build -f docker/Dockerfile.tests --tag ${TAG} "
BUILD+="--target test --build-arg PYTHON_VERSION=$(python.version) ."
echo ${BUILD}
eval ${BUILD}
PYTEST="docker run -e GE_CLOUD_ORGANIZATION_ID=$(GE_CLOUD_ORGANIZATION_ID) "
PYTEST+="-e GE_CLOUD_ACCESS_TOKEN=$(GE_CLOUD_ACCESS_TOKEN) -e GE_CLOUD_BASE_URL=$(GE_CLOUD_BASE_URL) "
PYTEST+="$TAG "
PYTEST+="pytest --random-order --cloud -m \"cloud and e2e\""
echo ${PYTEST}
eval ${PYTEST}
env:
GE_CLOUD_BASE_URL: $(GE_CLOUD_BASE_URL)
GE_CLOUD_ACCESS_TOKEN: $(GE_CLOUD_ACCESS_TOKEN)
GE_CLOUD_ORGANIZATION_ID: $(GE_CLOUD_ORGANIZATION_ID)
displayName: 'Cloud integration Tests'