Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions end-to-end-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
inputs:
versionSpec: '3.12'
addToPath: true
- bash: |
mkdir -p ~/.pyrit
displayName: "Create PyRIT configuration directory"
name: create_pyrit_dir
- task: AzureKeyVault@2
displayName: Azure Key Vault - retrieve .env file secret
inputs:
Expand All @@ -36,13 +40,13 @@ jobs:
secret = os.environ.get('PYRIT_TEST_SECRET');
if not secret:
raise ValueError('PYRIT_TEST_SECRET is not set');
with open('.env', 'w') as file:
with open(os.path.expanduser('~/.pyrit/.env'), 'w') as file:
file.write(secret)"
env:
PYRIT_TEST_SECRET: $(env-global)
name: create_env_file
- bash: |
cp build_scripts/env_local_integration_test .env.local
cp build_scripts/env_local_integration_test ~/.pyrit/.env.local
displayName: "Create .env.local from example"
- script:
wget -qO- https://astral.sh/uv/install.sh | sh
Expand Down Expand Up @@ -83,8 +87,6 @@ jobs:
NEW_DIR="e2e_test_directory"
cd ..
mkdir -p $NEW_DIR/tests
cp $PyRIT_DIR/.env $NEW_DIR
cp $PyRIT_DIR/.env.local $NEW_DIR
cp -r $PyRIT_DIR/doc $NEW_DIR
cp -r $PyRIT_DIR/assets $NEW_DIR
cp -r $PyRIT_DIR/tests/end_to_end $NEW_DIR/tests
Expand Down Expand Up @@ -112,7 +114,7 @@ jobs:
# Run end-to-end tests
make end-to-end-test
- bash: |
rm -f .env
rm -f ~/.pyrit/.env ~/.pyrit/.env.local
name: clean_up_env_files
condition: always()
- task: PublishTestResults@2
Expand Down
12 changes: 7 additions & 5 deletions integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ jobs:
inputs:
versionSpec: '3.12'
addToPath: true
- bash: |
mkdir -p ~/.pyrit
displayName: "Create PyRIT configuration directory"
name: create_pyrit_dir
- task: AzureKeyVault@2
displayName: Azure Key Vault - retrieve .env file secret
inputs:
Expand All @@ -34,13 +38,13 @@ jobs:
secret = os.environ.get('PYRIT_TEST_SECRET');
if not secret:
raise ValueError('PYRIT_TEST_SECRET is not set');
with open('.env', 'w') as file:
with open(os.path.expanduser('~/.pyrit/.env'), 'w') as file:
file.write(secret)"
env:
PYRIT_TEST_SECRET: $(env-global)
name: create_env_file
- bash: |
cp build_scripts/env_local_integration_test .env.local
cp build_scripts/env_local_integration_test ~/.pyrit/.env.local
displayName: "Create .env.local from example"
- script:
wget -qO- https://astral.sh/uv/install.sh | sh
Expand Down Expand Up @@ -81,8 +85,6 @@ jobs:
NEW_DIR="integration_test_directory"
cd ..
mkdir -p $NEW_DIR/tests
cp $PyRIT_DIR/.env $NEW_DIR
cp $PyRIT_DIR/.env.local $NEW_DIR
cp -r $PyRIT_DIR/doc $NEW_DIR
cp -r $PyRIT_DIR/assets $NEW_DIR
cp -r $PyRIT_DIR/tests/integration $NEW_DIR/tests
Expand Down Expand Up @@ -110,7 +112,7 @@ jobs:
# Run integration tests
make integration-test
- bash: |
rm -f .env
rm -f ~/.pyrit/.env ~/.pyrit/.env.local
name: clean_up_env_files
condition: always()
- task: PublishTestResults@2
Expand Down