From 3b0143396b7b90153e412c00409f9d59c00543c9 Mon Sep 17 00:00:00 2001 From: ethanhanjiahao Date: Fri, 3 Jun 2022 07:17:09 +0800 Subject: [PATCH] move coverage to build_and_test.yaml test job --- .github/workflows/build_and_test.yaml | 7 ++++++- .github/workflows/ci_coverage.yml | 30 --------------------------- 2 files changed, 6 insertions(+), 31 deletions(-) delete mode 100644 .github/workflows/ci_coverage.yml diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml index 3af00cd4d7b7..34b10fd6e0e2 100644 --- a/.github/workflows/build_and_test.yaml +++ b/.github/workflows/build_and_test.yaml @@ -30,4 +30,9 @@ jobs: go-version: ${{ env.GO_VERSION }} cache: true - name: test - run: make test + run: go test ./... -race -coverprofile=coverage.xml -covermode=atomic + - name: Upload coverage to Codecov + run: | + curl -Os https://uploader.codecov.io/latest/linux/codecov + chmod +x codecov + ./codecov diff --git a/.github/workflows/ci_coverage.yml b/.github/workflows/ci_coverage.yml deleted file mode 100644 index 4e9d77fb1fb0..000000000000 --- a/.github/workflows/ci_coverage.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: CI and Coverage -on: - push: - paths-ignore: - - "**/*.md" - - "**/*.png" - pull_request: - paths-ignore: - - "**/*.md" - - "**/*.png" -env: - GO_VERSION: 1.18.2 -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - uses: actions/setup-go@v3 - with: - go-version: ${{ env.GO_VERSION }} - cache: true - - name: Run coverage - run: go test ./... -race -coverprofile=coverage.xml -covermode=atomic - - name: Upload coverage to Codecov - run: | - curl -Os https://uploader.codecov.io/latest/linux/codecov - chmod +x codecov - ./codecov \ No newline at end of file