-
Notifications
You must be signed in to change notification settings - Fork 288
78 lines (76 loc) · 2.71 KB
/
tests.yml
File metadata and controls
78 lines (76 loc) · 2.71 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
name: Run all the unit tests
on:
push:
branches: [main]
pull_request:
jobs:
build:
# Avoiding -latest due to https://github.com/actions/setup-python/issues/162
runs-on: ubuntu-20.04
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python-version:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install synchronous dependencies
run: |
pip install -U pip
pip install -r requirements.txt
pip install -r requirements/testing_without_asyncio.txt
- name: Run tests without aiohttp
run: |
pytest tests/slack_bolt/ --junitxml=reports/test_slack_bolt.xml
pytest tests/scenario_tests/ --junitxml=reports/test_scenario.xml
- name: Install adapter dependencies
run: |
pip install -r requirements/adapter.txt
pip install -r requirements/adapter_testing.txt
- name: Run tests for HTTP Mode adapters
run: |
pytest tests/adapter_tests/ \
--ignore=tests/adapter_tests/socket_mode/ \
--ignore=tests/adapter_tests/asgi/ \
--junitxml=reports/test_adapter.xml
- name: Install async dependencies
run: |
pip install -r requirements/async.txt
- name: Run tests for HTTP Mode adapters (ASGI)
run: |
# Requires async test dependencies
pytest tests/adapter_tests/asgi/ --junitxml=reports/test_adapter_asgi.xml
- name: Run tests for Socket Mode adapters
run: |
# Requires async test dependencies
pytest tests/adapter_tests/socket_mode/ --junitxml=reports/test_adapter_socket_mode.xml
- name: Run tests for HTTP Mode adapters (asyncio-based libraries)
run: |
pytest tests/adapter_tests_async/ --junitxml=reports/test_adapter_async.xml
- name: Install all dependencies
run: |
pip install -r requirements/testing.txt
- name: Run asynchronous tests
run: |
pytest tests/slack_bolt_async/ --junitxml=reports/test_slack_bolt_async.xml
pytest tests/scenario_tests_async/ --junitxml=reports/test_scenario_async.xml
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
directory: ./reports/
flags: ${{ matrix.python-version }}
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true