From 0b1056f97300af21e60d75af82e57bc8742fb29e Mon Sep 17 00:00:00 2001 From: rick Date: Tue, 29 Jun 2021 22:34:03 +0800 Subject: [PATCH] Run code coverage test with the master branch --- .github/workflows/backup.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/backup.yaml b/.github/workflows/backup.yaml index d276deec..9088797b 100644 --- a/.github/workflows/backup.yaml +++ b/.github/workflows/backup.yaml @@ -38,3 +38,25 @@ jobs: env: GIT_DEPLOY_KEY: ${{ secrets.GIT_DEPLOY_KEY }} TARGET_GIT: "git@gitee.com:jenkins-zh/jenkins-cli.git" + UnitTest: + name: Test + runs-on: ubuntu-20.04 + steps: + - name: Set up Go 1.15 + uses: actions/setup-go@v2.1.3 + with: + go-version: 1.15 + id: go + - name: Check out code into the Go module directory + uses: actions/checkout@v2.3.4 + - name: Test + run: | + make test + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.out + flags: unittests + name: codecov-umbrella + fail_ci_if_error: true