Stricter release testing in venv
https://gitlab.com/teeworlds-network/twnet_parser/-/issues/3
This commit is contained in:
parent
454dfcdde2
commit
2cbc3671bd
|
@ -226,6 +226,36 @@ then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
rm -rf /tmp/twnet_parser_test
|
||||||
|
mkdir -p /tmp/twnet_parser_test
|
||||||
|
cp dist/twnet_parser-"${tag_name:1}".tar.gz /tmp/twnet_parser_test/
|
||||||
|
(
|
||||||
|
deactivate &>/dev/null
|
||||||
|
cd /tmp/twnet_parser_test || exit 1
|
||||||
|
python -m venv venv
|
||||||
|
source venv/bin/activate
|
||||||
|
if ! pip install twnet_parser-"${tag_name:1}".tar.gz
|
||||||
|
then
|
||||||
|
echo "Error: local test install of package failed (venv)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if ! python -c "import twnet_parser"
|
||||||
|
then
|
||||||
|
echo "Error: local test import failed (venv)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if ! python -c "import twnet_parser.packet"
|
||||||
|
then
|
||||||
|
echo "Error: local test import twnet_parser.packet failed (venv)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
) || {
|
||||||
|
echo "[*] venv install tests failed.";
|
||||||
|
exit 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "[*] venv tests passed."
|
||||||
|
|
||||||
if ! git add pyproject.toml
|
if ! git add pyproject.toml
|
||||||
then
|
then
|
||||||
echo "Error: git add failed"
|
echo "Error: git add failed"
|
||||||
|
|
|
@ -7,7 +7,7 @@ SCRIPT_ROOT="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 && pwd -P )"
|
||||||
cd "$SCRIPT_ROOT/.." || exit 1
|
cd "$SCRIPT_ROOT/.." || exit 1
|
||||||
|
|
||||||
bash "$SCRIPT_ROOT/lint_json.sh" || exit 1
|
bash "$SCRIPT_ROOT/lint_json.sh" || exit 1
|
||||||
find . -type f -name '*.sh' -print0 | xargs -0 shellcheck || exit 1
|
find . -type f -name '*.sh' -print0 | xargs -0 shellcheck -x || exit 1
|
||||||
pytest . || exit 1
|
pytest . || exit 1
|
||||||
pylint twnet_parser/ || exit 1
|
pylint twnet_parser/ || exit 1
|
||||||
mypy twnet_parser/ || exit 1
|
mypy twnet_parser/ || exit 1
|
||||||
|
|
Loading…
Reference in a new issue