From 7e795980aaeab20d050eaaac4f51146b9bbfbfd1 Mon Sep 17 00:00:00 2001 From: Xavier Berger Date: Tue, 5 Sep 2023 19:54:02 +0200 Subject: [PATCH] doc(coverage): publish coverage as gh-pages --- .github/workflows/continuous_integration.yml | 12 +++++++++++- .gitignore | 1 + appdaemon/test/requirements.txt | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index 05bb8dc..1668e1d 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -37,9 +37,19 @@ jobs: cd appdaemon coverage run --source apps -m pytest test coverage report -m + coverage html + coverage-badge -o htmlcov/coverage.svg + pwd + ls htmlcov/ - name: Test with pytest run: | cd appdaemon/test pytest -v - \ No newline at end of file + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: appdaemon/htmlcov + \ No newline at end of file diff --git a/.gitignore b/.gitignore index bf00fde..3bf47dc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ appdaemon/compiled/* **/__pycache__/* +**/.coverage diff --git a/appdaemon/test/requirements.txt b/appdaemon/test/requirements.txt index e523ee8..896c5b1 100644 --- a/appdaemon/test/requirements.txt +++ b/appdaemon/test/requirements.txt @@ -1,5 +1,6 @@ appdaemon==4.4.2 coverage==7.2.7 +coverage-badge==1.1.0 esphome==2023.8.0 pylint==2.17.5 pytest-random-order==1.1.0