From 5db884f4501e424d37e20aa43000ad2d7e9e84d1 Mon Sep 17 00:00:00 2001 From: Mrityunjeyan Sarvabhouman Date: Wed, 22 Apr 2026 22:18:34 +0530 Subject: [PATCH 1/4] Update codecov --- .github/workflows/unit-test.yml | 20 ++++++++++++++++++++ README.md | 2 +- docs/conf.py | 4 ++-- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index b0869b4..d74af3b 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -5,6 +5,13 @@ on: branches: - main - "[0-9]+\\.[0-9]+\\.[0-9]+" + push: + branches: + - main + +permissions: + contents: read + id-token: write # required for tokenless Codecov uploads via OIDC jobs: test: @@ -17,6 +24,8 @@ jobs: steps: - name: ๐Ÿ“ฅ Checkout code uses: actions/checkout@v4 + with: + fetch-depth: 0 # Codecov uses git history for blame/annotations - name: ๐Ÿ Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 @@ -50,6 +59,7 @@ jobs: --cov=pytest_html_plus \ --cov-fail-under=39 \ --cov-report=term \ + --cov-report=xml:coverage.xml \ --reruns 1 \ --ignore=tests/browser \ --generate-xml \ @@ -58,6 +68,16 @@ jobs: --git-commit "$REPORT_COMMIT" \ tests/ + - name: โ˜‚๏ธ Upload coverage to Codecov + if: matrix.python-version == '3.12' + uses: codecov/codecov-action@v4 + with: + files: ./coverage.xml + flags: unittests + name: codecov-pytest-html-plus + fail_ci_if_error: false + verbose: true + - name: ๐Ÿงช Run tests with warnings enabled run: | export REPORT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" diff --git a/README.md b/README.md index 784d746..90d1a1b 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ โžก๏ธ [View Demo Report](https://reporterplus.github.io/pytest-html-plus/) -[![Docs](https://img.shields.io/badge/docs-online-blue)](https://pytest-html-plus.readthedocs.io/en/main/) [![PyPI Downloads](https://static.pepy.tech/badge/pytest-html-plus)](https://pepy.tech/projects/pytest-html-plus) ![PyPI](https://img.shields.io/pypi/v/pytest-html-plus) ![Python Versions](https://img.shields.io/pypi/pyversions/pytest-html-plus) ![License](https://img.shields.io/pypi/l/pytest-html-plus) [![Unit Tests](https://github.com/reach2jeyan/pytest-report-plus/actions/workflows/unit-test.yml/badge.svg)](https://github.com/reach2jeyan/pytest-report-plus/actions/workflows/unit-test.yml) +[![Docs](https://img.shields.io/badge/docs-online-blue)](https://pytest-html-plus.readthedocs.io/en/main/) [![PyPI Downloads](https://static.pepy.tech/badge/pytest-html-plus)](https://pepy.tech/projects/pytest-html-plus) ![PyPI](https://img.shields.io/pypi/v/pytest-html-plus) ![Python Versions](https://img.shields.io/pypi/pyversions/pytest-html-plus) ![License](https://img.shields.io/pypi/l/pytest-html-plus) [![Unit Tests](https://github.com/reporterplus/pytest-html-plus/actions/workflows/unit-test.yml/badge.svg)](https://github.com/reporterplus/pytest-html-plus/actions/workflows/unit-test.yml) [![codecov](https://codecov.io/gh/reporterplus/pytest-html-plus/branch/main/graph/badge.svg)](https://codecov.io/gh/reporterplus/pytest-html-plus) [![Discord](https://img.shields.io/discord/1377581416337903646?labelColor=black&logo=discord&logoColor=c20a71&style=for-the-badge&color=c20a71)](https://discord.gg/nUNZ9crf) diff --git a/docs/conf.py b/docs/conf.py index f0d1046..107c302 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -6,9 +6,9 @@ sys.path.insert(0, os.path.abspath("..")) project = "pytest-html-plus" -copyright = "2025, ReporterPlus" +copyright = "2026, ReporterPlus" author = "ReporterPlus" -release = "0.5.0" +release = "1.0.0" extensions = [ "sphinx.ext.autodoc", From acfd7587e071c09a9523d491e1b5769e706fce2a Mon Sep 17 00:00:00 2001 From: reach2jeyan Date: Wed, 22 Apr 2026 22:26:34 +0530 Subject: [PATCH 2/4] Update token --- .github/workflows/unit-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index d74af3b..829a497 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -75,6 +75,7 @@ jobs: files: ./coverage.xml flags: unittests name: codecov-pytest-html-plus + token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: false verbose: true From 0515611868c4f762f678cc7c3c0db4446aec6037 Mon Sep 17 00:00:00 2001 From: reach2jeyan Date: Wed, 22 Apr 2026 22:38:16 +0530 Subject: [PATCH 3/4] update for main --- .github/workflows/coverage-main.yml | 63 +++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/coverage-main.yml diff --git a/.github/workflows/coverage-main.yml b/.github/workflows/coverage-main.yml new file mode 100644 index 0000000..04972d4 --- /dev/null +++ b/.github/workflows/coverage-main.yml @@ -0,0 +1,63 @@ +name: Coverage (main baseline) + +# Keeps Codecov's view of `main` fresh without re-running CI on every merge. +# Runs on a schedule every other day at 03:00 UTC, or manually on demand. + +on: + schedule: + - cron: "0 3 */2 * *" # ~every other day at 03:00 UTC + +permissions: + contents: read + +jobs: + coverage: + runs-on: ubuntu-latest + + steps: + - name: ๐Ÿ“ฅ Checkout main + uses: actions/checkout@v4 + with: + ref: main + fetch-depth: 0 # Codecov uses git history for blame/annotations + + - name: ๐Ÿ Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: ๐Ÿ“ฆ Install Poetry + run: | + curl -sSL https://install.python-poetry.org | python3 - + echo "$HOME/.local/bin" >> $GITHUB_PATH + + - name: ๐Ÿ“ฆ Cache Poetry virtualenv + uses: actions/cache@v4 + with: + path: ~/.cache/pypoetry + key: ${{ runner.os }}-poetry-3.12-${{ hashFiles('poetry.lock') }} + restore-keys: | + ${{ runner.os }}-poetry-3.12- + + - name: ๐Ÿ“ฆ Install dependencies with Poetry + run: poetry install --with dev + + - name: ๐Ÿงช Run tests with coverage + run: | + poetry run pytest \ + --cov=pytest_html_plus \ + --cov-report=term \ + --cov-report=xml:coverage.xml \ + --reruns 1 \ + --ignore=tests/browser \ + tests/ + + - name: โ˜‚๏ธ Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + files: ./coverage.xml + flags: unittests + name: codecov-pytest-html-plus-main + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: false + verbose: true From 8753b52b5c84d48d819f8990617ffe9fefdb387c Mon Sep 17 00:00:00 2001 From: reach2jeyan Date: Wed, 22 Apr 2026 22:41:08 +0530 Subject: [PATCH 4/4] trigger manually too --- .github/workflows/coverage-main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/coverage-main.yml b/.github/workflows/coverage-main.yml index 04972d4..2deca53 100644 --- a/.github/workflows/coverage-main.yml +++ b/.github/workflows/coverage-main.yml @@ -6,6 +6,7 @@ name: Coverage (main baseline) on: schedule: - cron: "0 3 */2 * *" # ~every other day at 03:00 UTC + workflow_dispatch: # allow manual runs from the Actions tab permissions: contents: read