From f7efd0c9d949227ba5be6845c463382612aa8b56 Mon Sep 17 00:00:00 2001 From: William Bergamin Date: Fri, 28 Mar 2025 16:32:34 -0400 Subject: [PATCH 1/2] health: publish test results to code cov --- .github/workflows/ci-build.yml | 12 ++++++++++-- .gitignore | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 5d483c1a3..e3c0f2cdf 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -36,20 +36,28 @@ jobs: cache: pip - name: Install dependencies run: | - pip install -U pip setuptools wheel + pip install -U pip pip install -r requirements/testing.txt pip install -r requirements/optional.txt - name: Run validation (black/flake8/pytest) run: | black --check slack/ slack_sdk/ tests/ integration_tests/ flake8 slack/ slack_sdk/ - PYTHONPATH=$PWD:$PYTHONPATH pytest --cov-report=xml --cov=slack_sdk/ tests/ + PYTHONPATH=$PWD:$PYTHONPATH pytest --cov-report=xml --cov=slack_sdk/ --junitxml=reports/test_report.xml tests/ - name: Run tests for SQLAlchemy v1.4 (backward-compatibility) run: | # Install v1.4 for testing pip install "SQLAlchemy>=1.4,<2" PYTHONPATH=$PWD:$PYTHONPATH pytest tests/slack_sdk/oauth/installation_store/test_sqlalchemy.py PYTHONPATH=$PWD:$PYTHONPATH pytest tests/slack_sdk/oauth/state_store/test_sqlalchemy.py + - 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 - name: Run codecov (only with latest supported version) if: startsWith(matrix.python-version, '3.13') uses: codecov/codecov-action@v5 diff --git a/.gitignore b/.gitignore index 219275c9a..5f316a341 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ venv*/ .coverage* cov_* coverage.xml +reports/ # due to using tox and pytest .tox From c4bf7a37a012673d5deae58cd42283d1811f8953 Mon Sep 17 00:00:00 2001 From: William Bergamin Date: Fri, 28 Mar 2025 16:50:25 -0400 Subject: [PATCH 2/2] Update name of coverage uploading --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index e3c0f2cdf..c9e9421aa 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -58,7 +58,7 @@ jobs: flags: ${{ matrix.python-version }} token: ${{ secrets.CODECOV_TOKEN }} verbose: true - - name: Run codecov (only with latest supported version) + - name: Upload test coverage to Codecov (only with latest supported version) if: startsWith(matrix.python-version, '3.13') uses: codecov/codecov-action@v5 with: