Skip to content

Commit

Permalink
CI - deflake Isolated pytest Ubuntu (quantumlib#6593)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pavoljuhas authored and jselig-rigetti committed May 28, 2024
1 parent a21219b commit df4d14e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ jobs:
- name: Install dependencies
run: pip install -r dev_tools/requirements/isolated-base.env.txt
- name: Test each module in isolation
run: pytest -n auto -m slow dev_tools/packaging/isolated_packages_test.py
run: pytest -n auto --enable-slow-tests dev_tools/packaging/isolated_packages_test.py
pytest:
name: Pytest Ubuntu
strategy:
Expand Down
2 changes: 1 addition & 1 deletion dev_tools/packaging/isolated_packages_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_isolated_packages(cloned_env, module):
assert f'cirq-core=={module.version}' in module.install_requires

result = shell_tools.run(
f"{env}/bin/pip install ./{module.root} ./cirq-core".split(),
f"{env}/bin/pip install --no-clean ./{module.root} ./cirq-core".split(),
stderr=subprocess.PIPE,
check=False,
)
Expand Down

0 comments on commit df4d14e

Please sign in to comment.