Skip to content

Commit

Permalink
import test workaround for expected truthy CI environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
drewgilliam committed Jun 16, 2022
1 parent 1c5c8d5 commit f39965e
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,19 @@ requirements:
- virtualenv-clone >=0.2.5

test:
imports:
- pipenv
commands:
# pipenv attempts to detect a CI environment via
# PIPENV_IS_CI = env_to_bool(os.environ.get("CI") or os.environ.get("TF_BUILD") or False)
# https://github.com/pypa/pipenv/blob/114eb8f80a63e519fe9d12ac9e7cb60444cf47c0/pipenv/environments.py#L101
#
# This expects the envvar "CI" to be truthy, however CI=azure in
# pipenv-feedstock. Use CI=1 as workaround
#
# Related:
# https://github.com/pypa/pipenv/pull/4944
# https://github.com/pypa/pipenv/issues/4909
- echo "CI=${CI}, TF_BUILD=${TF_BUILD}"
- CI=1 python -c "print os.environ.get('CI'); import pipenv"
- pipenv --help

about:
Expand Down

0 comments on commit f39965e

Please sign in to comment.