File tree Expand file tree Collapse file tree 6 files changed +151
-2
lines changed
Expand file tree Collapse file tree 6 files changed +151
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ concurrency:
2222jobs :
2323 build :
2424 runs-on : ubuntu-latest
25- name : Build Sphinx documentation
25+ name : Build Sphinx documentation and Special Badges
2626 steps :
2727 - uses : actions/checkout@v4
2828
3939 cd docs
4040 uv run sphinx-build . _build
4141
42+ - name : Generate reports
43+ run : |
44+ mkdir -p reports
45+ uv run pytest --cov=tdom --cov-report=xml:reports/coverage.xml --cov-report=term --cov-report=html:reports/coverage --junitxml=reports/pytest.xml --html=reports/pytest.html
46+
47+ - name : Generate badges
48+ run : |
49+ uv run genbadge tests -i reports/pytest.xml -v -o reports/pytest.svg
50+ uv run genbadge coverage -i reports/coverage.xml -v -o reports/coverage.svg
51+
52+ - name : Move reports to docs/_build
53+ run : |
54+ mv reports docs/_build/
55+
4256 - name : Upload artifact to pages
4357 uses : actions/upload-pages-artifact@v3
4458 with :
Original file line number Diff line number Diff line change 99# Virtual environments
1010.venv
1111
12- # Coverage
12+ # Coverage and test reports
1313.coverage
14+ reports /
1415
1516# Sphinx build output
1617docs /_build /
18+
19+ # macOS
20+ .DS_Store
Original file line number Diff line number Diff line change @@ -4,8 +4,11 @@ A 🤘 rockin' t-string HTML templating system for Python 3.14.
44
55[ ![ PyPI] ( https://img.shields.io/pypi/v/tdom.svg )] ( https://pypi.org/project/tdom/ )
66[ ![ Tests] ( https://github.com/t-strings/tdom/actions/workflows/ci.yml/badge.svg )] ( https://github.com/t-strings/tdom/actions/workflows/pytest.yml )
7+ [ ![ Test Count] ( https://t-strings.github.io/tdom/reports/pytest.svg )] ( https://t-strings.github.io/tdom/reports/pytest.html )
8+ [ ![ Coverage] ( https://t-strings.github.io/tdom/reports/coverage.svg )] ( https://t-strings.github.io/tdom/reports/coverage.html )
79[ ![ Changelog] ( https://img.shields.io/github/v/release/t-strings/tdom?include_prereleases&label=changelog )] ( https://github.com/t-strings/tdom/releases )
810[ ![ License] ( https://img.shields.io/badge/license-MIT-blue.svg )] ( https://github.com/t-strings/tdom/blob/main/LICENSE )
11+ [ ![ Docs] ( https://img.shields.io/badge/docs-online-blue.svg )] ( https://t-strings.github.io/tdom/ )
912
1013## Installation
1114
Original file line number Diff line number Diff line change @@ -31,3 +31,16 @@ clean_package:
3131build : build_docs build_package
3232
3333clean : clean_docs clean_package
34+
35+ reports :
36+ uv run pytest --cov=tdom --cov-report=xml:reports/ coverage.xml --cov-report=term --cov-report=html:reports/ coverage --junitxml=reports/ pytest.xml --html=reports/ pytest.html
37+
38+ clean_reports :
39+ rm -rf reports/
40+
41+ badges :
42+ uv run genbadge tests -i reports/ pytest.xml -v -o reports/ pytest.svg
43+ uv run genbadge coverage -i reports/ coverage.xml -v -o reports/ coverage.svg
44+
45+ clean_badges :
46+ rm -rf reports/ *.svg
Original file line number Diff line number Diff line change @@ -37,10 +37,12 @@ CI = "https://github.com/t-strings/tdom/actions"
3737[dependency-groups ]
3838dev = [
3939 " furo>=2025.7.19" ,
40+ " genbadge[coverage,tests]>=1.1.2" ,
4041 " myst-parser>=4.0.1" ,
4142 " pyright>=1.1.404" ,
4243 " pytest>=8.4.1" ,
4344 " pytest-cov>=6.3.0" ,
45+ " pytest-html>=4.1.1" ,
4446 " pytest-watcher>=0.4.3" ,
4547 " ruff>=0.12.11" ,
4648 " sphinx>=8.2.3" ,
You can’t perform that action at this time.
0 commit comments