From e2345a82851bd079d786bafe0064ffe8afd63fbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Sat, 2 Nov 2024 00:43:01 +0800 Subject: [PATCH] =?UTF-8?q?workflow:=20=E5=90=88=E5=B9=B6codecov=E4=B8=8Et?= =?UTF-8?q?est?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/codecov.yml | 26 -------------------------- .github/workflows/test.yml | 7 ++++++- 2 files changed, 6 insertions(+), 27 deletions(-) delete mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml deleted file mode 100644 index f99c0aca..00000000 --- a/.github/workflows/codecov.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Codecov -on: - push: - branches: - - main - pull_request: -jobs: - codecov: - runs-on: ubuntu-24.04 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Go - uses: actions/setup-go@v5 - with: - cache: true - go-version: 'stable' - - name: Install dependencies - run: go mod tidy - - name: Run tests with coverage - run: sudo go test -v -coverprofile="coverage.out" ./... - - name: Upload coverage report to Codecov - uses: codecov/codecov-action@v4 - with: - file: ./coverage.out - token: ${{ secrets.CODECOV }} \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index babeca06..f8b3d7bb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,4 +21,9 @@ jobs: run: | cp config.example.yml config.yml - name: Run tests - run: sudo go test ./... \ No newline at end of file + run: sudo go test -v -coverprofile="coverage.out" ./... + - name: Upload coverage report to Codecov + uses: codecov/codecov-action@v4 + with: + file: ./coverage.out + token: ${{ secrets.CODECOV }} \ No newline at end of file