From 394e4aa1167a833019ce800363732496ec8bb6ac Mon Sep 17 00:00:00 2001 From: kim pham Date: Fri, 15 Nov 2024 16:28:24 +0100 Subject: [PATCH] Update test.yml add total to github env --- .github/workflows/test.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index baab60a..8174131 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -70,6 +70,12 @@ jobs: git checkout - diff-cover --compare-branch=main coverage.xml --fail-under=85 + - name: "Combine" + run: | + export TOTAL=$(python -c "import json;print(json.load(open('coverage.json'))['totals']['percent_covered_display'])") + echo "total=$TOTAL" >> $GITHUB_ENV + echo "### Total coverage: ${TOTAL}%" >> $GITHUB_STEP_SUMMARY + - name: "Make badge" uses: schneegans/dynamic-badges-action@v1.4.0 with: