forked from bjornbytes/graphql-lua
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Makefile for convenient local run. Use Makefile in test CI. Add luacov dependency and run luatest with coverage. Keep /tmp for luacov reports. Based on PR #18 by @no1seman
- Loading branch information
1 parent
3bd94b4
commit b68ef16
Showing
5 changed files
with
42 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
statsfile = 'tmp/luacov.stats.out' | ||
reportfile = 'tmp/luacov.report.out' | ||
exclude = { | ||
'/test/', | ||
'/tmp/', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
SHELL := /bin/bash | ||
|
||
.PHONY: .rocks | ||
.rocks: graphql-scm-1.rockspec Makefile | ||
tarantoolctl rocks make | ||
tarantoolctl rocks install luatest 0.5.5 | ||
tarantoolctl rocks install luacov 0.13.0 | ||
tarantoolctl rocks install luacheck 0.26.0 | ||
|
||
.PHONY: lint | ||
lint: | ||
if [ ! -d ".rocks" ]; then make .rocks; fi | ||
.rocks/bin/luacheck . | ||
|
||
.PHONY: test | ||
test: | ||
if [ ! -d ".rocks" ]; then make .rocks; fi | ||
rm -f tmp/luacov* | ||
.rocks/bin/luatest --verbose --coverage --shuffle group | ||
.rocks/bin/luacov . && grep -A999 '^Summary' tmp/luacov.report.out | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf .rocks | ||
|
||
.PHONY: build | ||
build: | ||
if [ ! -d ".rocks" ]; then make .rocks; fi | ||
tarantoolctl rocks make | ||
tarantoolctl rocks pack graphql scm-1 |