From 835ae7cad19168bf63e06e2a98e19200a58a0903 Mon Sep 17 00:00:00 2001 From: Duncan Tourolle Date: Sat, 7 Jun 2025 15:50:48 +0200 Subject: [PATCH] automation of badges --- .gitea/workflows/ci.yml | 11 ++++++++++- README.md | 9 ++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 456dd1b..30f974d 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -88,4 +88,13 @@ jobs: - name: Test package installation run: | # Test that the package can be imported - python -c "import pyWebLayout; print('Package imported successfully')" \ No newline at end of file + python -c "import pyWebLayout; print('Package imported successfully')" + + - name: Commit coverage badges + if: github.ref == 'refs/heads/main' + run: | + git config --local user.email "action@gitea.local" + git config --local user.name "Gitea Action" + git add coverage*.svg + git diff --staged --quiet || git commit -m "Update coverage badges [skip ci]" + git push \ No newline at end of file diff --git a/README.md b/README.md index 6453ed2..b272eba 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@ # PyWebLayout -![Test Coverage](./coverage.svg) -![Documentation Coverage](./coverage-docs.svg) - +| Badge | Description | +|-------|-------------| +| ![Test Coverage](./coverage.svg) | **Test Coverage** - Percentage of code covered by unit tests | +| ![Documentation Coverage](./coverage-docs.svg) | **Documentation Coverage** - Percentage of code with docstrings | +| ![Build Status](./build-status.svg) | **Build Status** - Current CI/CD pipeline status | +| ![License](https://img.shields.io/badge/license-MIT-blue.svg) | **License** - Project licensing information | A Python library for HTML-like layout and rendering. ## Description