[Tarantool-patches] [PATCH 6/6] ci: enable flake8
sergeyb at tarantool.org
sergeyb at tarantool.org
Mon Dec 7 10:46:57 MSK 2020
From: Sergey Bronnikov <sergeyb at tarantool.org>
The main reason to enable continuous Python static analysis
is checking consistency in using quotes fixed in commit
9f4aca80dafbc8fb0ef8fb306927e78eef7fb3ef
('test: support Python 3 and make quotes use consistent')
---
.gitlab-ci.yml | 8 ++++++++
.travis.mk | 12 ++++++++++++
2 files changed, 20 insertions(+)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 668fc830d..646a6244a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -192,6 +192,14 @@ luacheck:
script:
- ${GITLAB_MAKE} test_debian_docker_luacheck
+flake8:
+ <<: *docker_test_definition
+ stage: static_analysis
+ tags:
+ - deploy_test
+ script:
+ - ${GITLAB_MAKE} test_debian_docker_flake8
+
# Tests
out_of_source:
diff --git a/.travis.mk b/.travis.mk
index 238e31cda..b767e80cd 100644
--- a/.travis.mk
+++ b/.travis.mk
@@ -114,6 +114,7 @@ $(BIN_DIR)/terraform:
# Release
configure_debian:
+ PATH="${PATH}:/root/.local/bin"
cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON ${CMAKE_EXTRA_PARAMS}
build_debian: configure_debian
@@ -209,6 +210,17 @@ test_debian_install_luacheck:
test_debian_luacheck: test_debian_install_luacheck configure_debian
make luacheck
+test_debian_docker_flake8:
+ docker run -w ${OOS_SRC_PATH} -v ${PWD}:${OOS_SRC_PATH} --privileged \
+ --cap-add=sys_nice --network=host -i ${DOCKER_IMAGE_TARANTOOL} \
+ make -f .travis.mk test_debian_flake8
+
+test_debian_install_flake8:
+ pip install flake8 flake8-quotes
+
+test_debian_flake8: test_debian_install_flake8 configure_debian
+ make flake8
+
# Out-Of-Source build
build_oos:
--
2.25.1
More information about the Tarantool-patches
mailing list