forked from Azure/PyRIT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAINT infrastructure for integration tests (Azure#612)
Co-authored-by: jsong468 <[email protected]> Co-authored-by: Daniel Perez-Becker <[email protected]> Co-authored-by: Volkan Kutal <[email protected]> Co-authored-by: rlundeen2 <[email protected]> Co-authored-by: Tiger Du <[email protected]>
- Loading branch information
1 parent
6f15d84
commit 099123b
Showing
7 changed files
with
89 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,44 @@ | ||
# Builds the pyrit environment and runs integration tests | ||
|
||
name: integration_tests | ||
# Builds the pyrit environment and runs integration tests | ||
|
||
trigger: | ||
- main | ||
|
||
pr: | ||
- main | ||
# There are additional PR triggers for this that are configurable in ADO. | ||
|
||
pool: | ||
vmImage: ubuntu-latest | ||
|
||
steps: | ||
|
||
- task: CmdLine@2 | ||
displayName: Create file | ||
- 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: | ||
script: 'echo "hello world"' | ||
testResultsFormat: 'JUnit' | ||
testResultsFiles: 'junit/test-results.xml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters