From 6b8eeeb3cfcf01b1e0cf9b221100a4aa1b9f7734 Mon Sep 17 00:00:00 2001 From: ancavar Date: Wed, 26 Apr 2023 18:42:42 +0300 Subject: [PATCH] feat: add test coverage reports back --- .github/workflows/test.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 634a8fc..3a061f4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,6 +18,13 @@ jobs: - name: Build with Gradle run: ./gradlew build + - name: JaCoCo Coverage Report + if: runner.os != 'Windows' + env: + report_path: trees/build/jacoco/report.csv + run: | + awk -F"," '{ instructions += $4 + $5; covered += $5; branches += $6 + $7; branches_covered +=$7 } END { print "Instructions covered:", covered"/"instructions, "--", 100*covered/instructions"%"; print "Branches covered:", branches_covered"/"branches, "--", 100*branches_covered/branches"%" }' $report_path + - uses: actions/upload-artifact@v3 if: ${{ github.ref == 'refs/heads/main' }} with: