Files
coredns/.github/workflows/go.coverage.yml
Yong Tang cedf6ffddc Disable CodeCov on commit push (#4572)
As commit push holds write access of GITHUB_TOKEN, we may
want to limit the scope of third-party test run.

This PR disable CodeCov on commit push. Pull request is still
ok.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2021-04-16 07:38:42 -07:00

27 lines
619 B
YAML

name: Go Coverage
on: [pull_request]
jobs:
test:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
id: go
- name: Check out code
uses: actions/checkout@v2
- name: Build
run: go build -v ./...
- name: Test With Coverage
run: |
for d in request core coremain plugin test; do \
( cd $d; go test -coverprofile=cover.out -covermode=atomic -race ./...; [ -f cover.out ] && cat cover.out >> ../coverage.txt ); \
done
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1