Skip to content

Commit 8b3b8cf

Browse files
improve validation script
1 parent c7f3655 commit 8b3b8cf

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

scripts/format.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ script_dir=`dirname $0`
55
cd ${script_dir}/..
66

77
if [[ "$1" != "--no-install" ]]; then
8-
export PIP_REQUIRE_VIRTUALENV=1
98
pip install -U pip
109
pip install -U -r requirements/tools.txt
1110
fi

scripts/run_validation.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,20 @@ current_py=$(python --version | sed -E 's/Python ([0-9]+\.[0-9]+).*/\1/')
1111

1212
./scripts/install.sh
1313

14-
echo "Generating code ..." && python scripts/codegen.py --path .
15-
echo "Running black (code formatter) ..." && ./scripts/format.sh --no-install
16-
17-
echo "Running linting checks ..." && ./scripts/lint.sh --no-install
14+
set -e
1815

19-
echo "Running tests with coverage reporting ..."
20-
test_target="${1:-tests/}"
21-
PYTHONPATH=$PWD:$PYTHONPATH pytest --cov-report=xml --cov=slack_sdk/ $test_target
16+
echo "Generating code ..." && python scripts/codegen.py --path .
2217

2318
# Run mypy type checking only on the latest supported Python version
2419
if [[ "$current_py" == "$LATEST_SUPPORTED_PY" ]]; then
20+
echo "Running black (code formatter) ..." && ./scripts/format.sh --no-install
21+
echo "Running linting checks ..." && ./scripts/lint.sh --no-install
2522
echo "Running mypy type checking ..." && ./scripts/run_mypy.sh --no-install
23+
else
24+
echo "Skipping formatting, linting, and type checking (current Python: $current_py, required: $LATEST_SUPPORTED_PY)"
2625
fi
26+
27+
28+
echo "Running tests with coverage reporting ..."
29+
test_target="${1:-tests/}"
30+
PYTHONPATH=$PWD:$PYTHONPATH pytest --cov-report=xml --cov=slack_sdk/ $test_target

0 commit comments

Comments
 (0)