Skip to content

Commit 6c87c50

Browse files
committed
Detect if running in Travis using PATH
1 parent 5fb5939 commit 6c87c50

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/functional/conftest.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,13 @@ def is_responsive() -> bool:
5555
return address
5656

5757

58+
def _running_in_travis_ci() -> bool:
59+
return '/home/travis/build' in os.getenv('PATH')
60+
61+
5862
@pytest.fixture(scope='session')
5963
def ipfs_service_auth() -> ty.Generator[ty.Tuple[str, str], None, None]:
60-
if os.getenv('CI') != 'yes':
64+
if not _running_in_travis_ci():
6165
# Docker pull hits docker hub rate limits when running on Travis CI; avoiding the
6266
# rate limit requires a Docker Hub account.
6367
#

0 commit comments

Comments
 (0)