Skip to content

Commit 91eea12

Browse files
reach2jeyanMrityunjeyan Sarvabhouman
andauthored
Include codecoverage badge (#239)
* Update codecov * Update token --------- Co-authored-by: Mrityunjeyan Sarvabhouman <mrityunjeyansarvabhouman@Mrityunjeyans-MacBook.local>
1 parent ac75b62 commit 91eea12

3 files changed

Lines changed: 24 additions & 3 deletions

File tree

.github/workflows/unit-test.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ on:
55
branches:
66
- main
77
- "[0-9]+\\.[0-9]+\\.[0-9]+"
8+
push:
9+
branches:
10+
- main
11+
12+
permissions:
13+
contents: read
14+
id-token: write # required for tokenless Codecov uploads via OIDC
815

916
jobs:
1017
test:
@@ -17,6 +24,8 @@ jobs:
1724
steps:
1825
- name: 📥 Checkout code
1926
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0 # Codecov uses git history for blame/annotations
2029

2130
- name: 🐍 Set up Python ${{ matrix.python-version }}
2231
uses: actions/setup-python@v5
@@ -50,6 +59,7 @@ jobs:
5059
--cov=pytest_html_plus \
5160
--cov-fail-under=39 \
5261
--cov-report=term \
62+
--cov-report=xml:coverage.xml \
5363
--reruns 1 \
5464
--ignore=tests/browser \
5565
--generate-xml \
@@ -58,6 +68,17 @@ jobs:
5868
--git-commit "$REPORT_COMMIT" \
5969
tests/
6070
71+
- name: ☂️ Upload coverage to Codecov
72+
if: matrix.python-version == '3.12'
73+
uses: codecov/codecov-action@v4
74+
with:
75+
files: ./coverage.xml
76+
flags: unittests
77+
name: codecov-pytest-html-plus
78+
token: ${{ secrets.CODECOV_TOKEN }}
79+
fail_ci_if_error: false
80+
verbose: true
81+
6182
- name: 🧪 Run tests with warnings enabled
6283
run: |
6384
export REPORT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
➡️ [View Demo Report](https://reporterplus.github.io/pytest-html-plus/)
77

8-
[![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)
8+
[![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)
99

1010
[![Discord](https://img.shields.io/discord/1377581416337903646?labelColor=black&logo=discord&logoColor=c20a71&style=for-the-badge&color=c20a71)](https://discord.gg/nUNZ9crf)
1111

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
sys.path.insert(0, os.path.abspath(".."))
77

88
project = "pytest-html-plus"
9-
copyright = "2025, ReporterPlus"
9+
copyright = "2026, ReporterPlus"
1010
author = "ReporterPlus"
11-
release = "0.5.0"
11+
release = "1.0.0"
1212

1313
extensions = [
1414
"sphinx.ext.autodoc",

0 commit comments

Comments
 (0)