Skip to content

Commit

Permalink
Pass GITHUB_* env variables via tox
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorTatarnikov committed May 30, 2024
1 parent 9b1b050 commit 9dc8bdd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ omit = benchmarks/*
[testenv]
extras =
dev
passenv = GITHUB_*
deps =
coredev: git+https://github.com/brainglobe/cellfinder.git
commands =
Expand Down
5 changes: 4 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ def set_device_arm_macos_ci():
GitHub runners. This is to avoid the following error:
https://discuss.pytorch.org/t/mps-back-end-out-of-memory-on-github-action/189773/5
"""
if os.getenv("CI") == "true" and torch.backends.mps.is_available():
if (
os.getenv("GITHUB_ACTIONS") == "true"
and torch.backends.mps.is_available()
):
import keras

Check warning on line 25 in tests/conftest.py

View check run for this annotation

Codecov / codecov/patch

tests/conftest.py#L25

Added line #L25 was not covered by tests

keras.src.backend.common.global_state.set_global_attribute(

Check warning on line 27 in tests/conftest.py

View check run for this annotation

Codecov / codecov/patch

tests/conftest.py#L27

Added line #L27 was not covered by tests
Expand Down

0 comments on commit 9dc8bdd

Please sign in to comment.