Skip to content

Commit 39391d4

Browse files
committed
Add coverage tooloing, update test tooling staff and improve coverage
1 parent 6512d2b commit 39391d4

File tree

11 files changed

+139
-99
lines changed

11 files changed

+139
-99
lines changed

.github/workflows/test_on_push.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222

2323
- name: Install dependencies
2424
run: |
25-
tarantoolctl rocks install luatest 0.5.2
26-
tarantoolctl rocks install luacheck 0.25.0
25+
tarantoolctl rocks install luatest 0.5.5
26+
tarantoolctl rocks install luacheck 0.26.0
2727
tarantoolctl rocks make
2828
2929
- name: Run linter

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
.doctrees
77
__pycache__
88
/dev
9-
/tmp
9+
/tmp/*
10+
!/tmp/.keep
1011
doc
1112
release
1213
release-doc
@@ -27,4 +28,4 @@ luacov.*.out*
2728
/package-lock.json
2829
*.mo
2930
.history
30-
.vscode
31+
*.rock

.luacov

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
statsfile = 'tmp/luacov.stats.out'
2+
reportfile = 'tmp/luacov.report.out'
3+
exclude = {
4+
'/test/',
5+
'/tmp/',
6+
}

Makefile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
SHELL := /bin/bash
2+
3+
.PHONY: .rocks
4+
.rocks: graphql-scm-1.rockspec Makefile
5+
tarantoolctl rocks make
6+
tarantoolctl rocks install luatest 0.5.5
7+
tarantoolctl rocks install luacov 0.13.0
8+
tarantoolctl rocks install luacheck 0.26.0
9+
10+
.PHONY: lint
11+
lint:
12+
if [ ! -d ".rocks" ]; then make .rocks; fi
13+
.rocks/bin/luacheck .
14+
15+
.PHONY: test
16+
test: lint
17+
rm -f tmp/luacov*
18+
.rocks/bin/luatest --verbose --coverage --shuffle group
19+
.rocks/bin/luacov . && grep -A999 '^Summary' tmp/luacov.report.out
20+
21+
.PHONY: clean
22+
clean:
23+
rm -rf .rocks
24+
25+
.PHONY: build
26+
build:
27+
if [ ! -d ".rocks" ]; then make .rocks; fi
28+
tarantoolctl rocks make
29+
tarantoolctl rocks pack graphql scm-1

graphql/execute.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ local function getFieldEntry(objectType, object, fields, context)
278278
if argument and argument.value then
279279
positions[pos] = {
280280
name=argument.name.value,
281-
value=arguments[argument.name.value]
281+
value=arguments[argument.name.value],
282282
}
283283
pos = pos + 1
284284
end
@@ -346,4 +346,6 @@ local function execute(schema, tree, rootValue, variables, operationName)
346346
end
347347

348348

349-
return {execute=execute}
349+
return {
350+
execute=execute,
351+
}

0 commit comments

Comments
 (0)