Skip to content

Commit 3160056

Browse files
authored
CI - deflake Isolated pytest Ubuntu (#6593)
Problem: `test_isolated_packages` may run clashing parallel builds of a local `cirq_core` wheel. Solution: Run pip-install with the `--no-clean` option so parallel builds do not delete active files. Also invoke isolated_packages_test.py with `--enable-slow-tests` in CI to include non-slow tests if ever added to that file.
1 parent ee2b78f commit 3160056

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ jobs:
144144
- name: Install dependencies
145145
run: pip install -r dev_tools/requirements/isolated-base.env.txt
146146
- name: Test each module in isolation
147-
run: pytest -n auto -m slow dev_tools/packaging/isolated_packages_test.py
147+
run: pytest -n auto --enable-slow-tests dev_tools/packaging/isolated_packages_test.py
148148
pytest:
149149
name: Pytest Ubuntu
150150
strategy:

dev_tools/packaging/isolated_packages_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def test_isolated_packages(cloned_env, module):
3939
assert f'cirq-core=={module.version}' in module.install_requires
4040

4141
result = shell_tools.run(
42-
f"{env}/bin/pip install ./{module.root} ./cirq-core".split(),
42+
f"{env}/bin/pip install --no-clean ./{module.root} ./cirq-core".split(),
4343
stderr=subprocess.PIPE,
4444
check=False,
4545
)

0 commit comments

Comments
 (0)