Files
coredns/.github/workflows/go.coverage.yml
2022-03-02 04:47:08 -08:00

31 lines
836 B
YAML

name: Go Coverage
on: [pull_request]
permissions:
contents: read
jobs:
test:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492
with:
go-version: '1.17.0'
id: go
- name: Check out code
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
- 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@f32b3a3741e1053eb607407145bc9619351dc93b