forked from slackapi/bolt-python
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (84 loc) · 2.83 KB
/
ci-build.yml
File metadata and controls
86 lines (84 loc) · 2.83 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: CI Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-20.04
timeout-minutes: 15
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9']
env:
# default: multiprocessing
# threading is more stable on GitHub Actions
BOLT_PYTHON_MOCK_SERVER_MODE: threading
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python setup.py install
pip install -U pip
pip install "pytest>=5,<6" "pytest-cov>=2,<3" "flask_sockets>0.2,<1"
- name: Run tests without aiohttp
run: |
pytest tests/slack_bolt/
pytest tests/scenario_tests/
- name: Run tests for Socket Mode adapters
run: |
pip install -e ".[adapter]"
pytest tests/adapter_tests/socket_mode/
- name: Run tests for HTTP Mode adapters (AWS)
run: |
pytest tests/adapter_tests/aws/
- name: Run tests for HTTP Mode adapters (Bottle)
run: |
pytest tests/adapter_tests/bottle/
- name: Run tests for HTTP Mode adapters (CherryPy)
run: |
pytest tests/adapter_tests/cherrypy/
- name: Run tests for HTTP Mode adapters (Django)
run: |
pytest tests/adapter_tests/django/
- name: Run tests for HTTP Mode adapters (Falcon)
run: |
pytest tests/adapter_tests/falcon/
- name: Run tests for HTTP Mode adapters (Flask)
run: |
pytest tests/adapter_tests/flask/
- name: Run tests for HTTP Mode adapters (Pyramid)
run: |
pytest tests/adapter_tests/pyramid/
- name: Run tests for HTTP Mode adapters (Starlette)
run: |
pytest tests/adapter_tests/starlette/
- name: Run tests for HTTP Mode adapters (Tornado)
run: |
pytest tests/adapter_tests/tornado/
- name: Run tests for HTTP Mode adapters (asyncio-based libraries)
run: |
pip install -e ".[async]"
pytest tests/adapter_tests_async/
- name: Run pytype verification (3.8 only)
run: |
python_version=`python -V`
if [ ${python_version:7:3} == "3.8" ]; then
pip install -e ".[async]"
pip install -e ".[adapter]"
pip install "pytype" && pytype slack_bolt/
fi
- name: Run all tests for codecov (3.9 only)
run: |
python_version=`python -V`
if [ ${python_version:7:3} == "3.9" ]; then
pip install -e ".[async]"
pip install -e ".[testing]"
pytest --cov=slack_bolt/ && bash <(curl -s https://codecov.io/bash)
fi