Skip to content

Commit

Permalink
check autogenerated modules in travis
Browse files Browse the repository at this point in the history
  • Loading branch information
derElektrobesen committed Oct 1, 2019
1 parent d36647e commit e7d44e1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ go:
before_install:
- go get github.com/mattn/goveralls
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.15.0
- env GO111MODULE=on go get ./cmd/goqueryset
script:
- env GO111MODULE=on make test
- env GO111MODULE=on $HOME/gopath/bin/goveralls -ignore "internal/queryset/generator/test/autogenerated_models.go,examples/comparison/*/*.go,internal/queryset/generator/test/pkgimport/*.go,internal/queryset/generator/test/pkgimport/*/*/*.go" -v -service=travis-ci
- make clean_autogenerated
- env GO111MODULE=on make gen
- test -z "$(git status -s)" && exit 0
- echo "Folowing modules should be regenerated:\n$(git status -s)\n"
- echo "Call 'make gen' to fix this issue."
- exit 1
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ gen:
@- $(foreach F,$(AUTOGEN_FILES), \
go generate $$(dirname $F); \
)

clean_autogenerated:
@rm -f $(AUTOGEN_FILES)

0 comments on commit e7d44e1

Please sign in to comment.