From 70c7b6775c671a6d75672e152cb64c196c1b610b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Kazami=20=5B=E4=B9=94=E6=B2=BB=C2=B7=E9=A2=A8?= =?UTF-8?q?=E8=A6=8B=5D?= Date: Fri, 17 Mar 2023 03:50:20 +0000 Subject: [PATCH] chore: add code coverage --- .github/workflows/code-coverage.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/code-coverage.yml diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml new file mode 100644 index 0000000..df18fa8 --- /dev/null +++ b/.github/workflows/code-coverage.yml @@ -0,0 +1,22 @@ +name: Code coverage CI +on: [pull_request] + +jobs: + build: + runs-on: [ self-hosted, Linux ] + steps: + - uses: actions/checkout@v3 + + - name: Monitor coverage + uses: slavcodev/coverage-monitor-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + coverage_path: "logs/clover.xml" + threshold_alert: 75 + threshold_warning: 90 + threshold_metric: "lines" + comment: "true" + comment_context: "Coverage Report" + comment_mode: "replace" + comment_footer: "true" +