代码拉取完成,页面将自动刷新
同步操作将从 test/pipenv 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/usr/bin/env bash
# NOTE: set TEST_SUITE to be markers you want to run.
set -eo pipefail
export PYTHONIOENCODING="utf-8"
export LANG=C.UTF-8
export PIP_PROCESS_DEPENDENCY_LINKS="1"
prefix() {
sed "s/^/ $1: /"
}
if [[ ! -z "$TEST_SUITE" ]]; then
echo "Using TEST_SUITE=$TEST_SUITE"
fi
HOME=$(readlink -f ~/)
if [[ -z "$HOME" ]]; then
if [[ "$USER" == "root" ]]; then
HOME="/root"
fi
fi
if [[ ! -z "$HOME" ]]; then
export PATH="${HOME}/.local/bin:${PATH}"
fi
# pip uninstall -y pipenv
pip install certifi
export GIT_SSL_CAINFO=$(python -m certifi)
echo "Path: $PATH"
echo "Installing Pipenv…"
PIP_USER="1" python -m pip install --upgrade setuptools
PIP_USER="1" python3 -m pip install --upgrade setuptools
python -m pip install -e "$(pwd)" --upgrade && python3 -m pip install -e "$(pwd)" --upgrade
python3 -m pipenv install --deploy --dev --system
# Otherwise, we're on a development machine.
# First, try MacOS…
if [[ $(python -c "import sys; print(sys.platform)") == "darwin" ]]; then
echo "Clearing Caches…"
rm -fr ~/Library/Caches/pip
rm -fr ~/Library/Caches/pipenv
# Otherwise, assume Linux…
else
echo "Clearing Caches…"
rm -fr ~/.cache/pip
rm -fr ~/.cache/pipenv
fi
echo "Installing dependencies…"
PIPENV_PYTHON=2.7 python3 -m pipenv --venv && pipenv --rm && pipenv install --dev
PIPENV_PYTHON=3.7 python3 -m pipenv --venv && pipenv --rm && pipenv install --dev
PIPENV_PYTHON=2.7 python3 -m pipenv run pip install --upgrade -e .
PIPENV_PYTHON=3.7 python3 -m pipenv run pip install --upgrade -e .
echo "$ pipenv run time pytest -v -n auto tests -m \"$TEST_SUITE\""
# PIPENV_PYTHON=2.7 pipenv run time pytest -v -n auto tests -m "$TEST_SUITE" | prefix 2.7 &
# PIPENV_PYTHON=3.6 pipenv run time pytest -v -n auto tests -m "$TEST_SUITE" | prefix 3.6
# Better to run them sequentially.
PIPENV_PYTHON=2.7 python3 -m pipenv run time pytest
PIPENV_PYTHON=3.7 python3 -m pipenv run time pytest
# test revendoring
pip3 install --upgrade invoke requests parver vistir
python3 -m invoke vendoring.update
# Cleanup junk.
rm -fr .venv
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。