mirror of
https://github.com/coredns/coredns.git
synced 2025-11-19 02:12:30 -05:00
* Update golang version to 1.17 This PR updates golang version to 1.17 when applicable. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Remove `^` to avoid cache This commit removes `^` to avoid cache in build system Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Change to 1.17.0 Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
29 lines
664 B
YAML
29 lines
664 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
|
|
with:
|
|
go-version: '1.17.0'
|
|
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@v2.0.3
|