forked from slackapi/bolt-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_all_and_run_tests.sh
More file actions
executable file
·39 lines (35 loc) · 1.23 KB
/
install_all_and_run_tests.sh
File metadata and controls
executable file
·39 lines (35 loc) · 1.23 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
#!/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
# The package causes a conflict with moto
pip uninstall python-lambda
test_target="$1"
pip install -e .
if [[ $test_target != "" ]]
then
# To fix: Using legacy 'setup.py install' for greenlet, since package 'wheel' is not installed.
pip install -U wheel && \
pip install -e ".[testing]" && \
pip install -e ".[adapter]" && \
pip install -e ".[adapter_testing]" && \
# 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
# To fix: Using legacy 'setup.py install' for greenlet, since package 'wheel' is not installed.
pip install -U wheel && \
pip install -e ".[testing]" && \
pip install -e ".[adapter]" && \
pip install -e ".[adapter_testing]" && \
# To avoid errors due to the old versions of click forced by Chalice
pip install -U pip click && \
black slack_bolt/ tests/ && \
pytest && \
pip install -U pytype && \
pytype slack_bolt/
fi