Skip to content

Commit 8d18ac9

Browse files
authored
HOTFIX - Poetry Version Check (#124)
1 parent a4906f4 commit 8d18ac9

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ license = "MIT"
77
readme = "README.md"
88
package-mode = false
99

10+
# https://peps.python.org/pep-0518/#tool-table
11+
[tool.static_tests]
12+
poetry_version = "1.8.4"
13+
1014
[tool.poetry.dependencies]
1115
python = "^3.12"
1216
aiobotocore = "*"

scripts/run_tests.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
11
#! /bin/bash
22

3+
function display_result {
4+
RESULT=$1
5+
EXIT_STATUS=$2
6+
TEST=$3
7+
8+
if [ $RESULT -ne 0 ]; then
9+
echo -e "\033[31m$TEST failed\033[0m"
10+
exit $EXIT_STATUS
11+
else
12+
echo -e "\033[32m$TEST passed\033[0m"
13+
fi
14+
}
15+
16+
17+
# Poetry version stability check
18+
POETRY_VERSION=$(grep "poetry_version" pyproject.toml | grep -oE "[0-9]{1}.[0-9]{1,3}.[0-9]{1,3}")
19+
head -1 poetry.lock | grep -qE "${POETRY_VERSION}"
20+
display_result $? 1 "Expected Poetry version: ${POETRY_VERSION}, found: $(head -1 poetry.lock | grep -oE "[0-9]{1}.[0-9]{1,3}.[0-9]{1,3}")"
21+
22+
323
# Values set in pyroject.toml
424
pytest

0 commit comments

Comments
 (0)