Ignore vendor/ for CI
This commit is contained in:
parent
f74e045273
commit
bd398847ba
@ -12,7 +12,7 @@ echo "mode: count" > profile.cov
|
||||
FAIL=0
|
||||
|
||||
# Standard go tooling behavior is to ignore dirs with leading underscors
|
||||
for dir in $(find . -maxdepth 10 -not -path './.git*' -not -path '*/_*' -type d);
|
||||
for dir in $(find . -maxdepth 10 -not -path './.git*' -not -path '*/_*' -type d | grep -v '^./vendor/');
|
||||
do
|
||||
if ls $dir/*.go &> /dev/null; then
|
||||
go test -v -covermode=count -coverprofile=profile.tmp $dir || FAIL=$?
|
||||
@ -33,6 +33,9 @@ fi
|
||||
# Test if every package has testfiles
|
||||
for dir in $(find . -name "*.go" -printf '%h\0'| sort -zu | sed -z 's/$/\n/');
|
||||
do
|
||||
# ignore ./vendor/ completely
|
||||
[[ $dir == ./vendor/* ]] && continue
|
||||
|
||||
if [ "$(ls $dir/*_test.go 2> /dev/null | wc -l)" -eq "0" ]; then
|
||||
echo -n "no test files for $dir";
|
||||
case $dir in
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
result="$(gofmt -s -l .)"
|
||||
result="$(gofmt -s -l . | grep -v '^vendor/' )"
|
||||
if [ -n "$result" ]; then
|
||||
echo "Go code is not formatted, run 'gofmt -s -w .'" >&2
|
||||
echo "$result"
|
||||
|
@ -11,5 +11,5 @@ install:
|
||||
script:
|
||||
- ./.test-coverage travis-ci
|
||||
- ./.travis.gofmt.sh
|
||||
- misspell -error .
|
||||
- find . -type f -name '*.go' | grep -v '^./vendor/' | xargs misspell -error
|
||||
- go install github.com/FreifunkBremen/yanic
|
||||
|
Loading…
Reference in New Issue
Block a user