From 92d33c86ef46a9ea0b132680e88629b90dd7022e Mon Sep 17 00:00:00 2001 From: jdinovi Date: Thu, 21 Dec 2023 16:05:57 -0700 Subject: [PATCH] add coverage test in .yml file --- .github/workflows/coverage.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 4ccf13c..3d0f7da 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install gcov run: | @@ -33,3 +33,13 @@ jobs: fi echo "gcov is installed." + - name: Generate Coverage + run: | + COVERAGE=$(make coverage | grep 'TOTAL COVERAGE' | grep -Eo '[0-9]+') + + if [ "$COVERAGE" -gt 89 ]; then + echo "success" + else + echo "failure" + fi +