From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp17.mail.ru (smtp17.mail.ru [94.100.176.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 82733469710 for ; Tue, 12 May 2020 12:52:31 +0300 (MSK) From: sergeyb@tarantool.org Date: Tue, 12 May 2020 12:49:55 +0300 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v5 02/10] gitlab-ci: enable static analysis with luacheck List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org Cc: o.piskunov@tarantool.org From: Sergey Bronnikov Closes #4681 --- .gitlab-ci.yml | 11 +++++++++++ .travis.mk | 17 +++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b3b07dac5..9c4ca57cf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,5 @@ stages: + - static_analysis - test - perf - cleanup @@ -96,6 +97,16 @@ variables: script: - ${GITLAB_MAKE} perf_run +# Static Analysis + +luacheck: + <<: *docker_test_definition + stage: static_analysis + tags: + - deploy_test + script: + - ${GITLAB_MAKE} test_debian_docker_luacheck + # Tests release: diff --git a/.travis.mk b/.travis.mk index 8aa0e6116..3c8e627d0 100644 --- a/.travis.mk +++ b/.travis.mk @@ -6,6 +6,8 @@ DOCKER_IMAGE?=packpack/packpack:debian-stretch TEST_RUN_EXTRA_PARAMS?= MAX_FILES?=65534 MAX_PROC?=2500 +LANES_ROCKSPEC="https://luarocks.org/manifests/benoitgermain/lanes-3.13.0-0.rockspec" +OOS_SRC_PATH="/source" all: package @@ -146,6 +148,21 @@ test_static_build: deps_debian_static test_static_docker_build: docker build --no-cache --network=host --build-arg RUN_TESTS=ON -f Dockerfile.staticbuild . +# ################### +# Static Analysis +# ################### + +test_debian_docker_luacheck: + docker run -w ${OOS_SRC_PATH} -v ${PWD}:${OOS_SRC_PATH} --privileged --cap-add=sys_nice \ + --network=host -i registry.gitlab.com/tarantool/tarantool/testing/debian-stretch:latest \ + make -f .travis.mk test_debian_luacheck + +test_debian_luacheck: + apt update -y + apt install -y lua5.1 luarocks + luarocks install luacheck + luacheck --codes --config .luacheckrc . + ####### # OSX # ####### -- 2.23.0