From 7d39d1319bd76fd46b63b25905d078eca0eb7a66 Mon Sep 17 00:00:00 2001 From: dudaodong Date: Mon, 29 Nov 2021 15:19:52 +0800 Subject: [PATCH] add github workflow --- codecov.yml => .github/workflows/codecov.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) rename codecov.yml => .github/workflows/codecov.yml (77%) diff --git a/codecov.yml b/.github/workflows/codecov.yml similarity index 77% rename from codecov.yml rename to .github/workflows/codecov.yml index 9d38577..aaa6fca 100644 --- a/codecov.yml +++ b/.github/workflows/codecov.yml @@ -1,7 +1,11 @@ name: Test and coverage - -on: [push, pull_request] - +on: + push: + branches: + - main + pull_request: + branches: + - main jobs: build: runs-on: ubuntu-latest @@ -11,7 +15,7 @@ jobs: fetch-depth: 2 - uses: actions/setup-go@v2 with: - go-version: '1.16' + go-version: "1.16" - name: Run coverage run: go test -race -coverprofile=coverage.txt -covermode=atomic - name: Upload coverage to Codecov