test: add test targets for go and quarkus templates (#72)

This commit adds Makefile targets for go and quarkus, and includes these
in the regular `make test` target. I've also added a couple of entries to
.gitignore.
This commit is contained in:
Lance Ball 2020-08-19 07:56:35 -04:00 committed by GitHub
parent 6be6b71262
commit c0426b5a3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

4
.gitignore vendored
View File

@ -2,4 +2,8 @@
/faas_*
/templates/go/events/go.sum
/templates/go/http/go.sum
/coverage.out
/bin
target
node_modules

View File

@ -34,7 +34,7 @@ $(LINUX):
$(WINDOWS):
env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o $(WINDOWS) -ldflags "-X main.date=$(DATE) -X main.vers=$(VERS) -X main.hash=$(HASH)" ./cmd/$(BIN)
test: test-binary test-node
test: test-binary test-node test-quarkus test-go
test-binary:
go test -race -cover -coverprofile=coverage.out ./...
@ -43,6 +43,14 @@ test-node:
cd templates/node/events && npm install && npm test && rm -rf node_modules
cd templates/node/http && npm install && npm test && rm -rf node_modules
test-quarkus:
cd templates/quarkus/events && mvn test
cd templates/quarkus/http && mvn test
test-go:
cd templates/go/events && go test
cd templates/go/http && go test
image: Dockerfile
docker build -t $(REPO):latest \
-t $(REPO):$(VERS) \