Skip to content

health: publish test results to code cov #993

health: publish test results to code cov

health: publish test results to code cov #993

Workflow file for this run

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/slack_bolt.xml
pytest tests/scenario_tests/ --junitxml=reports/scenario_tests.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/adapter_tests.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/adapter_tests_asgi.xml
- name: Run tests for Socket Mode adapters
run: |
# Requires async test dependencies
pytest tests/adapter_tests/socket_mode/ --junitxml=reports/adapter_tests_socket_mode.xml
- name: Run tests for HTTP Mode adapters (asyncio-based libraries)
run: |
pytest tests/adapter_tests_async/ --junitxml=reports/adapter_tests_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/slack_bolt_async.xml
pytest tests/scenario_tests_async/ --junitxml=reports/scenario_tests_async.xml
- name: Merge junit xml testsuite results
run: |
python scripts/merge_junit_results.py reports/*.xml >&0 | cat > report.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