Skip to content

Add coverage tooling, update test tooling and improve coverage #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test_on_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:

- name: Install dependencies
run: |
tarantoolctl rocks install luatest 0.5.2
tarantoolctl rocks install luacheck 0.25.0
tarantoolctl rocks install luatest 0.5.5
tarantoolctl rocks install luacheck 0.26.0
tarantoolctl rocks make

- name: Run linter
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
.doctrees
__pycache__
/dev
/tmp
/tmp/*
!/tmp/.keep
doc
release
release-doc
Expand All @@ -27,4 +28,4 @@ luacov.*.out*
/package-lock.json
*.mo
.history
.vscode
*.rock
6 changes: 6 additions & 0 deletions .luacov
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/',
}
29 changes: 29 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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: lint
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
6 changes: 4 additions & 2 deletions graphql/execute.lua
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ local function getFieldEntry(objectType, object, fields, context)
if argument and argument.value then
positions[pos] = {
name=argument.name.value,
value=arguments[argument.name.value]
value=arguments[argument.name.value],
}
pos = pos + 1
end
Expand Down Expand Up @@ -346,4 +346,6 @@ local function execute(schema, tree, rootValue, variables, operationName)
end


return {execute=execute}
return {
execute=execute,
}
Loading