-
Many continuous integration services like GitLab and Travis-CI have the $CI environment variable set in their execution environments. Some tools such as Python pipenv for example will check for the presence of the $CI variable and automatically configure settings approriate for a CI runtime environment. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
+1 Some tests should only be run on CI, others never on CI. Some tests should only selected or not on certain CIs. Please include one called CI plus another to identify as GitHub Actions. Here’s a summary of the truthy env vars from some popular CIs:
Docs: |
Beta Was this translation helpful? Give feedback.
-
We already have GITHUB_ACTIONS, GITHUB_WORKFLOW, GITHUB_WORKSPACE, GITHUB_SHA, and about a dozen of others to make sure we’re running under GitHub, so this part is covered IMHO. Only CI is missing :slight_smile: |
Beta Was this translation helpful? Give feedback.
-
Thanks, CI would still be good. Here’s the docs about those (and it’s GITHUB_ACTION without an S): |
Beta Was this translation helpful? Give feedback.
-
There’s two distinct values here. GITHUB_ACTION is the name of the action that’s running, if any (and there may not be one). GITHUB_ACTIONS is always set to show that you’re running within GitHub Actions. |
Beta Was this translation helpful? Give feedback.
-
Thanks for clarifying. Please could you add GITHUB_ACTIONS to the the docs? |
Beta Was this translation helpful? Give feedback.
-
Yes, an update is coming soon. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Seems this is done! docs.github.comEnvironment variables - GitHub Docs//docs.github.com/en/actions/reference/environment-variables |
Beta Was this translation helpful? Give feedback.
Seems this is done!

docs.github.comEnvironment variables - GitHub Docs
//docs.github.com/en/actions/reference/environment-variables