True when executing inside GitHub Actions (or another CI runner). Browser platforms are intentionally skipped in CI because their session secrets are not exposed there — that skip is expected and stays quiet. A skip during a *local* run, by contrast, almost always means a forgotten
()
| 1047 | |
| 1048 | |
| 1049 | def _running_in_ci() -> bool: |
| 1050 | """True when executing inside GitHub Actions (or another CI runner). |
| 1051 | |
| 1052 | Browser platforms are intentionally skipped in CI because their session |
| 1053 | secrets are not exposed there — that skip is expected and stays quiet. |
| 1054 | A skip during a *local* run, by contrast, almost always means a forgotten |
| 1055 | or expired session, so we surface it loudly instead. |
| 1056 | """ |
| 1057 | return bool(os.environ.get("GITHUB_ACTIONS") or os.environ.get("CI")) |
| 1058 | |
| 1059 | |
| 1060 | # --------------------------------------------------------------------------- # |