From c8b57793dc7de91b71f3e22d1e3d814584876a2e Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Mon, 4 Dec 2023 23:40:07 +0100 Subject: [PATCH] add step for genbadge and push on gh pages --- .github/workflows/binette_ci.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/binette_ci.yml b/.github/workflows/binette_ci.yml index 880d5d6..6c65ea1 100644 --- a/.github/workflows/binette_ci.yml +++ b/.github/workflows/binette_ci.yml @@ -45,8 +45,19 @@ jobs: - name: Test with pytest run: | - mamba install pytest - pytest + mamba install pytest pytest-cov + pytest --cov=binette --cov-report=html --cov-report=xml + + - name: Generate coverage badge + run: | + pip install genbadge[coverage] + genbadge coverage -i coverage.xml -o htmlcov/coverage-badge.svg + + - name: Publish coverage report to GitHub Pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: htmlcov + branch: gh-pages - name: Download test data uses: actions/checkout@v3