mirror of
https://github.com/coredns/coredns.git
synced 2025-10-26 15:54:16 -04:00
Remove travis and move to github workflow (#4267)
Add github testing workflow, simplify the Makefile because that was complex because of Travis. Remove the fuzzing, needs to be re-added when that works properly with go modules (it has been disabled for quite some time). Multiple builds and files have been added so these tests can all run in parallel. Our testing now tests a couple of minutes, the codeql is by far the more expensive. Move metric's naming test to test/presubmit_test.go Add longer sleep in the TestAutoAXFR. Bye bye travis! Closes: #4266 Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
48
Makefile
48
Makefile
@@ -18,54 +18,6 @@ coredns: $(CHECKS)
|
||||
.PHONY: check
|
||||
check: core/plugin/zplugin.go core/dnsserver/zdirectives.go
|
||||
|
||||
.PHONY: travis
|
||||
travis:
|
||||
ifeq ($(TEST_TYPE),core)
|
||||
( cd request; go test -race ./... )
|
||||
( cd core; go test -race ./... )
|
||||
( cd coremain; go test -race ./... )
|
||||
endif
|
||||
ifeq ($(TEST_TYPE),integration)
|
||||
( cd test; go test -race ./... )
|
||||
endif
|
||||
ifeq ($(TEST_TYPE),fmt)
|
||||
( echo "fmt"; gofmt -w -s . | grep ".*\.go"; if [ "$$?" = "0" ]; then exit 1; fi )
|
||||
endif
|
||||
ifeq ($(TEST_TYPE),metrics)
|
||||
( echo "metrics"; go get github.com/fatih/faillint)
|
||||
( faillint -paths "github.com/prometheus/client_golang/prometheus.{NewCounter,NewCounterVec,NewCounterVec,\
|
||||
NewGauge,NewGaugeVec,NewGaugeFunc,NewHistorgram,NewHistogramVec,NewSummary,NewSummaryVec}=github.com/prometheus/client_golang/prometheus/promauto.{NewCounter,\
|
||||
NewCounterVec,NewCounterVec,NewGauge,NewGaugeVec,NewGaugeFunc,NewHistorgram,NewHistogramVec,NewSummary,NewSummaryVec}" ./...)
|
||||
endif
|
||||
ifeq ($(TEST_TYPE),plugin)
|
||||
( cd plugin; go test -race ./... )
|
||||
endif
|
||||
ifeq ($(TEST_TYPE),coverage)
|
||||
for d in `go list ./... | grep -v vendor`; do \
|
||||
t=$$(date +%s); \
|
||||
go test -i -coverprofile=cover.out -covermode=atomic $$d || exit 1; \
|
||||
go test -coverprofile=cover.out -covermode=atomic $$d || exit 1; \
|
||||
if [ -f cover.out ]; then \
|
||||
cat cover.out >> coverage.txt && rm cover.out; \
|
||||
fi; \
|
||||
done
|
||||
endif
|
||||
ifeq ($(TEST_TYPE),fuzzit)
|
||||
# skip fuzzing for PR
|
||||
if [ "$(TRAVIS_PULL_REQUEST)" = "false" ] || [ "$(FUZZIT_TYPE)" = "local-regression" ] ; then \
|
||||
export GO111MODULE=off; \
|
||||
go get -u github.com/dvyukov/go-fuzz/go-fuzz-build; \
|
||||
go get -u -v .; \
|
||||
cd ../../go-acme/lego && git checkout v2.5.0; \
|
||||
cd ../../coredns/coredns; \
|
||||
LIBFUZZER=YES $(MAKE) -f Makefile.fuzz all; \
|
||||
$(MAKE) -sf Makefile.fuzz fuzzit; \
|
||||
for i in `$(MAKE) -sf Makefile.fuzz echo`; do echo $$i; \
|
||||
./fuzzit create job --type $(FUZZIT_TYPE) coredns/$$i ./$$i; \
|
||||
done; \
|
||||
fi;
|
||||
endif
|
||||
|
||||
core/plugin/zplugin.go core/dnsserver/zdirectives.go: plugin.cfg
|
||||
go generate coredns.go
|
||||
|
||||
|
||||
Reference in New Issue
Block a user