-
Notifications
You must be signed in to change notification settings - Fork 398
/
Copy pathintegration-tests.yml
44 lines (39 loc) · 1.17 KB
/
integration-tests.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
# Builds the pyrit environment and runs integration tests
trigger:
- main
# There are additional PR triggers for this that are configurable in ADO.
pool:
vmImage: ubuntu-latest
steps:
- task: AzureKeyVault@2
displayName: Azure Key Vault - retrieve .env file secret
inputs:
azureSubscription: 'integration-test-service-connection'
KeyVaultName: 'pyrit-environment'
SecretsFilter: 'env-integration-test'
RunAsPreJob: false
- bash: |
python -c "
import os;
secret = os.environ.get('PYRIT_TEST_SECRET');
if not secret:
raise ValueError('PYRIT_TEST_SECRET is not set');
with open('.env', 'w') as file:
file.write(secret)"
env:
PYRIT_TEST_SECRET: $(env-integration-test)
name: create_env_file
- bash: pip install --upgrade setuptools pip
name: upgrade_pip_and_setuptools_before_installing_PyRIT
- bash: sudo apt-get install python3-tk
name: install_tkinter
- bash: pip install .[all]
name: install_PyRIT
- bash: make integration-test
name: run_integration_tests
- bash: rm -f .env
name: clean_up_env_file
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: 'junit/test-results.xml'