Skip to content

Commit 0b2c91e

Browse files
health: publish test results to code cov (#1677)
* health: publish test results to code cov * Update name of coverage uploading
1 parent 4d15fde commit 0b2c91e

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.github/workflows/ci-build.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,29 @@ jobs:
3636
cache: pip
3737
- name: Install dependencies
3838
run: |
39-
pip install -U pip setuptools wheel
39+
pip install -U pip
4040
pip install -r requirements/testing.txt
4141
pip install -r requirements/optional.txt
4242
- name: Run validation (black/flake8/pytest)
4343
run: |
4444
black --check slack/ slack_sdk/ tests/ integration_tests/
4545
flake8 slack/ slack_sdk/
46-
PYTHONPATH=$PWD:$PYTHONPATH pytest --cov-report=xml --cov=slack_sdk/ tests/
46+
PYTHONPATH=$PWD:$PYTHONPATH pytest --cov-report=xml --cov=slack_sdk/ --junitxml=reports/test_report.xml tests/
4747
- name: Run tests for SQLAlchemy v1.4 (backward-compatibility)
4848
run: |
4949
# Install v1.4 for testing
5050
pip install "SQLAlchemy>=1.4,<2"
5151
PYTHONPATH=$PWD:$PYTHONPATH pytest tests/slack_sdk/oauth/installation_store/test_sqlalchemy.py
5252
PYTHONPATH=$PWD:$PYTHONPATH pytest tests/slack_sdk/oauth/state_store/test_sqlalchemy.py
53-
- name: Run codecov (only with latest supported version)
53+
- name: Upload test results to Codecov
54+
if: ${{ !cancelled() }}
55+
uses: codecov/test-results-action@v1
56+
with:
57+
directory: ./reports/
58+
flags: ${{ matrix.python-version }}
59+
token: ${{ secrets.CODECOV_TOKEN }}
60+
verbose: true
61+
- name: Upload test coverage to Codecov (only with latest supported version)
5462
if: startsWith(matrix.python-version, '3.13')
5563
uses: codecov/codecov-action@v5
5664
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ venv*/
1919
.coverage*
2020
cov_*
2121
coverage.xml
22+
reports/
2223

2324
# due to using tox and pytest
2425
.tox

0 commit comments

Comments
 (0)