-
Notifications
You must be signed in to change notification settings - Fork 289
Expand file tree
/
Copy pathinstall_all_and_run_tests.sh
More file actions
executable file
·41 lines (35 loc) · 1.24 KB
/
install_all_and_run_tests.sh
File metadata and controls
executable file
·41 lines (35 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# Run all the tests or a single test
# all: ./scripts/install_all_and_run_tests.sh
# single: ./scripts/install_all_and_run_tests.sh tests/scenario_tests/test_app.py
script_dir=`dirname $0`
cd ${script_dir}/..
rm -rf ./slack_bolt.egg-info
# Update pip to prevent warnings
pip install -U pip
# The package causes a conflict with moto
pip uninstall python-lambda
test_target="$1"
python_version=`python --version | awk '{print $2}'`
pip install -e .
if [[ $test_target != "" ]]
then
pip install -U -r requirements/testing.txt && \
pip install -U -r requirements/adapter.txt && \
pip install -U -r requirements/adapter_testing.txt && \
# To avoid errors due to the old versions of click forced by Chalice
pip install -U pip click && \
black slack_bolt/ tests/ && \
pytest $1
else
pip install -U -r requirements/testing.txt && \
pip install -U -r requirements/adapter.txt && \
pip install -U -r requirements/adapter_testing.txt && \
pip install -r requirements/tools.txt && \
# To avoid errors due to the old versions of click forced by Chalice
pip install -U pip click && \
black slack_bolt/ tests/ && \
flake8 slack_bolt/ && flake8 examples/
pytest && \
mypy --config-file pyproject.toml
fi