Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v2
- uses: tarantool/setup-tarantool@v1
with:
tarantool-version: '2.7'
tarantool-version: '2.8'

- run: echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
- run: tarantoolctl rocks new_version --tag $TAG
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/test_on_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login != 'tarantool'
strategy:
matrix:
tarantool-version: ["1.10", "2.7"]
tarantool-version: ["1.10", "2.8"]
fail-fast: false
runs-on: [ubuntu-20.04]
steps:
Expand All @@ -21,13 +21,10 @@ jobs:
tarantool-version: ${{ matrix.tarantool-version }}

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

- name: Run linter
run: .rocks/bin/luacheck .
run: make lint

- name: Run tests
run: .rocks/bin/luatest -v
run: make test
4 changes: 3 additions & 1 deletion .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 @@ -28,3 +29,4 @@ luacov.*.out*
*.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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a bit strange. You can make .rocks non-phony target to achieve the same behaviour. But, it seems, you don't want, because it may miss some dependencies (say, after manual tarantoolctl rocks make). That's minor, though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I borrowed it from original PR, but I think the motivation was the same as your assumption.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would do it so:

.rocks/bin/luacheck
        tarantoolctl rocks install luacheck <ver>

.rocks/bin/luatest
        tarantoolctl rocks install luatest <ver>

.rocks/bin/luacov
        tarantoolctl rocks install luacov <ver>

.PHONY: dependencies
dependencies:
        tarantoolctl rocks make

.PNOHY: dependencies-test
depdendencies-test: depdendencies .rocks/bin/luacheck .rocks/bin/luatest .rocks/bin/luacov
        true

But simpler is better and if everything typically works okay, I propose to don't make things more complex.

.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 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