Procházet zdrojové kódy

Enforce tests do not change files in source tree (#9625)

tags/v1.10.5
zeripath před 4 roky
rodič
revize
20d637a0f8
Žádný účet není propojen s e-mailovou adresou tvůrce revize
2 změnil soubory, kde provedl 13 přidání a 1 odebrání
  1. 1
    1
      .drone.yml
  2. 12
    0
      Makefile

+ 1
- 1
.drone.yml Zobrazit soubor

@@ -118,7 +118,7 @@ steps:
pull: always
image: golang:1.13
commands:
- make unit-test-coverage
- make unit-test-coverage test-check
environment:
GOPROXY: off
TAGS: bindata sqlite sqlite_unlock_notify

+ 12
- 0
Makefile Zobrazit soubor

@@ -226,6 +226,18 @@ fmt-check:
test:
GO111MODULE=on $(GO) test -mod=vendor -tags='sqlite sqlite_unlock_notify' $(PACKAGES)

PHONY: test-check
test-check:
@echo "Checking if tests have changed the source tree...";
@diff=$$(git status -s); \
if [ -n "$$diff" ]; then \
echo "make test has changed files in the source tree:"; \
echo "$${diff}"; \
echo "You should change the tests to create these files in a temporary directory."; \
echo "Do not simply add these files to .gitignore"; \
exit 1; \
fi;

.PHONY: test\#%
test\#%:
GO111MODULE=on $(GO) test -mod=vendor -tags='sqlite sqlite_unlock_notify' -run $* $(PACKAGES)

Načítá se…
Zrušit
Uložit