From 3bd7b484c8e72e032bcba4336034d8e18100cf46 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Thu, 30 Sep 2021 16:58:04 +0800 Subject: [PATCH] feat: add codecov --- .github/workflows/main.yml | 8 ++++---- README.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9f92fdc0..7ece2dd5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,7 +27,7 @@ jobs: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - - name: Test - run: go test ./... - - name: Test coverage - run: go test -coverprofile="cover.out" ./... # quotes needed for powershell + - name: Run coverage + run: go test -race -coverprofile=coverage.txt -covermode=atomic + - name: Upload coverage to Codecov + run: bash <(curl -s https://codecov.io/bash) diff --git a/README.md b/README.md index 2f044440..34fd7832 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Go Reference](https://pkg.go.dev/badge/github.com/httprunner/httpboomer.svg)](https://pkg.go.dev/github.com/httprunner/httpboomer) [![Github Actions](https://github.com/httprunner/HttpBoomer/actions/workflows/main.yml/badge.svg)](https://github.com/httprunner/HttpBoomer/actions) -[![Coverage Status](https://coveralls.io/repos/github/httprunner/HttpBoomer/badge.svg?branch=main)](https://coveralls.io/github/httprunner/HttpBoomer?branch=main) +[![codecov](https://codecov.io/gh/httprunner/HttpBoomer/branch/main/graph/badge.svg?token=HPCQWCD7KO)](https://codecov.io/gh/httprunner/HttpBoomer) # HttpBoomer