forked from officialmofabs/modern-data-warehouse-dataops
-
Notifications
You must be signed in to change notification settings - Fork 1
/
integration-tests-job.yml
42 lines (39 loc) · 1.62 KB
/
integration-tests-job.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
jobs:
- job: run_integration_tests
displayName: 'Run integration tests'
dependsOn: deploy_synapse_workspace
pool:
vmImage: 'ubuntu-latest'
variables:
pythonWorkingDir: 'e2e_samples/parking_sensors_synapse/tests/integrationtests'
pythonVersion: 3.8
steps:
- script: |
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo bash -c "curl https://packages.microsoft.com/config/debian/10/prod.list > /etc/apt/sources.list.d/mssql-release.list"
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get -y install msodbcsql17 unixodbc-dev
displayName: 'Install msodbc'
- task: UsePythonVersion@0
inputs:
versionSpec: '$(pythonVersion)'
addToPath: true
architecture: 'x64'
displayName: 'Use Python Version: $(pythonVersion)'
- script: pip install -r requirements.txt
workingDirectory: $(pythonWorkingDir)
displayName: 'Install requirements'
- script: pytest
workingDirectory: $(pythonWorkingDir)
env:
AZ_SERVICE_PRINCIPAL_ID: $(spSynapseId)
AZ_SERVICE_PRINCIPAL_SECRET: $(spSynapsePass)
AZ_SERVICE_PRINCIPAL_TENANT_ID: $(spSynapseTenantId)
AZ_SUBSCRIPTION_ID: $(subscriptionId)
AZ_RESOURCE_GROUP_NAME: $(rgName)
AZ_SYNAPSE_NAME: $(synapseWorkspaceName)
AZ_SYNAPSE_DEDICATED_SQLPOOL_NAME: $(synapseSqlPoolServer).sql.azuresynapse.net
AZ_SYNAPSE_SQLPOOL_ADMIN_USERNAME: $(synapseSqlPoolAdminUsername)
AZ_SYNAPSE_SQLPOOL_ADMIN_PASSWORD: $(synapseSqlPoolAdminPassword)
AZ_SYNAPSE_DEDICATED_SQLPOOL_DATABASE_NAME: $(synapseDedicatedSqlPoolDBName)
displayName: 'Run integration tests'