Skip to content

Allow CI related env variables in pass_env #3442

@abelcheung

Description

@abelcheung

What's the problem this feature will solve?

This can help users tailor make tox envs inside CI environment via different settings etc. I believe using tox in GitHub Actions, GitLab pipelines etc isn't so exotic. Giving access to a few extra os env variables should be able to help them a little bit.

For example, hypothesis has routine to tweak a few settings by default when running inside CI to help alleviate frequent test failures due to tighter CI resources (compare with desktop machines or local servers).

But the tweak isn't not enabled when running tests via tox. Every tox users would need to add the variable themselves in tox config if they discover the issue, or modify test settings manually if they don't.

Describe the solution you'd like

There are at least 2 env variable that fits this purpose.

  • CI: For GitHub, GitLab, Travis CI, Appveyor etc
  • TF_BUILD: For Azure
  • Some vendors have specific os variables preset, like GITHUB_ACTIONS, GITLAB_CI etc.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions