We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 296c4b3 commit 9b89d33Copy full SHA for 9b89d33
src/anemoi/utils/testing.py
@@ -246,8 +246,16 @@ def _offline() -> bool:
246
from urllib import request
247
from urllib.error import URLError
248
249
+ # We consider ourselves online in CI environments, so that tests can run there
250
+ # even if the website is not reachable. This ensure that we don't skip tests
251
+ # unexpectedly in CI.
252
+
253
+ IN_CI = (os.environ.get("GITHUB_WORKFLOW") is not None) or (os.environ.get("IN_CI_HPC") is not None)
254
+ if IN_CI:
255
+ return False
256
257
try:
- request.urlopen("https://anemoi.ecmwf.int", timeout=1)
258
+ request.urlopen("https://anemoi.ecmwf.int/status", timeout=10)
259
return False
260
except URLError:
261
return True
0 commit comments