Skip to content

Commit 4e11adf

Browse files
[FIX] fix out of memory errors (microsoft#1198)
1 parent 5c71efb commit 4e11adf

2 files changed

Lines changed: 23 additions & 9 deletions

File tree

.github/workflows/build_and_test.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ jobs:
5757
run: python -m pip install --upgrade pip setuptools packaging
5858

5959
- name: Install dev extras
60-
run: pip install --cache-dir "$PIP_CACHE_DIR" .[dev,all]
60+
run: pip install --no-cache-dir .[dev,all]
61+
62+
- name: disk space
63+
run: df -all -h
6164

6265
- name: Run pre-commit incrementally (on PR)
6366
if: github.event_name == 'pull_request'
@@ -107,8 +110,10 @@ jobs:
107110
run: python -m pip install --upgrade pip setuptools packaging
108111

109112
- name: Install dev extras
110-
run: |
111-
pip install --cache-dir "$env:PIP_CACHE_DIR" '.[dev,all]'
113+
run: pip install --no-cache-dir '.[dev,all]'
114+
115+
- name: disk space
116+
run: df -all -h
112117

113118
- name: Run pre-commit incrementally (on PR)
114119
if: github.event_name == 'pull_request'
@@ -175,7 +180,7 @@ jobs:
175180
extras="${{ matrix.package_extras }}"
176181
fi
177182
178-
pip install --cache-dir "$PIP_CACHE_DIR" ".[${extras}]"
183+
pip install --no-cache-dir ".[${extras}]"
179184
180185
- name: Run unit tests with code coverage
181186
run: make unit-test-cov-xml

integration-tests.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
# Builds the pyrit environment and runs integration tests
33

44
trigger:
5-
- main
5+
branches:
6+
include:
7+
- main
68

79
# There are additional PR triggers for this that are configurable in ADO.
810

@@ -13,6 +15,8 @@ jobs:
1315
pool:
1416
vmImage: ubuntu-latest
1517
steps:
18+
- checkout: self
19+
fetchDepth: 1
1620
- task: UsePythonVersion@0
1721
inputs:
1822
versionSpec: '3.12'
@@ -66,9 +70,11 @@ jobs:
6670
6771
echo "Microsoft ODBC Driver 18 installed successfully."
6872
displayName: 'Install ODBC Driver 18 for SQL Server'
69-
- bash: pip install .[dev,all] -v
73+
- bash: pip install .[dev,all] -v --no-cache-dir
7074
name: install_PyRIT
71-
# This step ensures that integration tests are run outside of the PyRIT repository to test that .env files are accessed correctly.
75+
- bash: df -all -h
76+
name: disk_space_check
77+
# This step ensures that integration tests are run outside of the PyRIT repository to test that .env files are accessed correctly.
7278
- bash: |
7379
PyRIT_DIR=$(pwd)
7480
NEW_DIR="integration_test_directory"
@@ -102,9 +108,12 @@ jobs:
102108
103109
# Run integration tests
104110
make integration-test
105-
- bash: rm -f .env
106-
name: clean_up_env_file
111+
- bash: |
112+
rm -f .env
113+
name: clean_up_env_files
114+
condition: always()
107115
- task: PublishTestResults@2
116+
condition: always()
108117
inputs:
109118
testResultsFormat: 'JUnit'
110119
testResultsFiles: 'junit/test-results.xml'

0 commit comments

Comments
 (0)