Skip to content

Commit e1ac14f

Browse files
health: publish test results to code cov (#1282)
1 parent c0ea531 commit e1ac14f

File tree

2 files changed

+24
-39
lines changed

2 files changed

+24
-39
lines changed

.github/workflows/tests.yml

Lines changed: 23 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -35,60 +35,44 @@ jobs:
3535
pip install -r requirements/testing_without_asyncio.txt
3636
- name: Run tests without aiohttp
3737
run: |
38-
pytest tests/slack_bolt/
39-
pytest tests/scenario_tests/
38+
pytest tests/slack_bolt/ --junitxml=reports/test_slack_bolt.xml
39+
pytest tests/scenario_tests/ --junitxml=reports/test_scenario.xml
4040
- name: Install adapter dependencies
4141
run: |
4242
pip install -r requirements/adapter.txt
4343
pip install -r requirements/adapter_testing.txt
44-
- name: Run tests for HTTP Mode adapters (AWS)
44+
- name: Run tests for HTTP Mode adapters
4545
run: |
46-
pytest tests/adapter_tests/aws/
47-
- name: Run tests for HTTP Mode adapters (Bottle)
48-
run: |
49-
pytest tests/adapter_tests/bottle/
50-
- name: Run tests for HTTP Mode adapters (CherryPy)
51-
run: |
52-
pytest tests/adapter_tests/cherrypy/
53-
- name: Run tests for HTTP Mode adapters (Django)
54-
run: |
55-
pytest tests/adapter_tests/django/
56-
- name: Run tests for HTTP Mode adapters (Falcon)
57-
run: |
58-
pytest tests/adapter_tests/falcon/
59-
- name: Run tests for HTTP Mode adapters (Flask)
60-
run: |
61-
pytest tests/adapter_tests/flask/
62-
- name: Run tests for HTTP Mode adapters (Pyramid)
63-
run: |
64-
pytest tests/adapter_tests/pyramid/
65-
- name: Run tests for HTTP Mode adapters (Starlette)
66-
run: |
67-
pytest tests/adapter_tests/starlette/
68-
- name: Run tests for HTTP Mode adapters (Tornado)
69-
run: |
70-
pytest tests/adapter_tests/tornado/
71-
- name: Run tests for HTTP Mode adapters (WSGI)
72-
run: |
73-
pytest tests/adapter_tests/wsgi/
46+
pytest tests/adapter_tests/ \
47+
--ignore=tests/adapter_tests/socket_mode/ \
48+
--ignore=tests/adapter_tests/asgi/ \
49+
--junitxml=reports/test_adapter.xml
7450
- name: Install async dependencies
7551
run: |
7652
pip install -r requirements/async.txt
53+
- name: Run tests for HTTP Mode adapters (ASGI)
54+
run: |
55+
# Requires async test dependencies
56+
pytest tests/adapter_tests/asgi/ --junitxml=reports/test_adapter_asgi.xml
7757
- name: Run tests for Socket Mode adapters
7858
run: |
7959
# Requires async test dependencies
80-
pytest tests/adapter_tests/socket_mode/
60+
pytest tests/adapter_tests/socket_mode/ --junitxml=reports/test_adapter_socket_mode.xml
8161
- name: Run tests for HTTP Mode adapters (asyncio-based libraries)
8262
run: |
83-
pytest tests/adapter_tests_async/
84-
- name: Run tests for HTTP Mode adapters (ASGI)
85-
run: |
86-
# Requires async test dependencies
87-
pytest tests/adapter_tests/asgi/
63+
pytest tests/adapter_tests_async/ --junitxml=reports/test_adapter_async.xml
8864
- name: Install all dependencies
8965
run: |
9066
pip install -r requirements/testing.txt
9167
- name: Run asynchronous tests
9268
run: |
93-
pytest tests/slack_bolt_async/
94-
pytest tests/scenario_tests_async/
69+
pytest tests/slack_bolt_async/ --junitxml=reports/test_slack_bolt_async.xml
70+
pytest tests/scenario_tests_async/ --junitxml=reports/test_scenario_async.xml
71+
- name: Upload test results to Codecov
72+
if: ${{ !cancelled() }}
73+
uses: codecov/test-results-action@v1
74+
with:
75+
directory: ./reports/
76+
flags: ${{ matrix.python-version }}
77+
token: ${{ secrets.CODECOV_TOKEN }}
78+
verbose: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ venv/
2121
.coverage
2222
cov_*
2323
coverage.xml
24+
reports/
2425

2526
# due to using tox and pytest
2627
.tox

0 commit comments

Comments
 (0)