From 48c7611f825279ead79c775ee7a9aebfb8e8f379 Mon Sep 17 00:00:00 2001 From: Adrian Cederberg Date: Tue, 20 Aug 2024 12:34:42 -0600 Subject: [PATCH] feature(package): Added coverage report publishing. Will make only for `master` once functioning. --- .github/workflows/commit_checks.yaml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/commit_checks.yaml b/.github/workflows/commit_checks.yaml index 77ea36a..03dca9d 100644 --- a/.github/workflows/commit_checks.yaml +++ b/.github/workflows/commit_checks.yaml @@ -194,17 +194,36 @@ jobs: continue-on-error: true - name: Create Coverage Report. + # if: github.ref == 'refs/heads/master' run: | docker compose \ --file docker/compose.ci.yaml \ exec server \ bash -c ' \ source ~/app/.venv/bin/activate \ - && poetry run coverage html' + && poetry run coverage html --directory ./coverage-report' continue-on-error: true - name: Stop Compose Project. if: always() run: docker compose --file docker/compose.ci.yaml down + # --------------------------------------------------------------------- # + # Master only. + + - name: Copy Coverage Report To Host. + # if: github.ref == 'refs/heads/master' + run: | + docker compose \ + --file docker/compose.ci.yaml \ + cp server:/home/captura/app/coverage-report ./coverage-report + + - name: Put Coverage Report On GitHub Pages. + # if: github.ref == 'refs/heads/master' + uses: JamesIves/github-pages-deploy-action@v4 + with: + branch: $GITHUB_BRANCH + folder: coverage-report # The folder the action should deploy. + +