Tarantool development patches archive
 help / color / mirror / Atom feed
From: sergeyb@tarantool.org
To: tarantool-patches@dev.tarantool.org, lvasiliev@tarantool.org
Cc: alexander.turenko@tarantool.org
Subject: [Tarantool-patches] [PATCH 6/6] ci: enable flake8
Date: Mon,  7 Dec 2020 10:46:57 +0300	[thread overview]
Message-ID: <4ba10d3c0b982fbf30d2ccc47008fac91f6727a8.1607326642.git.sergeyb@tarantool.org> (raw)
In-Reply-To: <cover.1607326642.git.sergeyb@tarantool.org>

From: Sergey Bronnikov <sergeyb@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

      parent reply	other threads:[~2020-12-07  7:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-07  7:46 [Tarantool-patches] [PATCH 0/6] Support Python 3 in tests and PEPify source code sergeyb
2020-12-07  7:46 ` [Tarantool-patches] [PATCH 1/6] test: support Python 3 and make quotes use consistent sergeyb
2020-12-09 15:58   ` Leonid Vasiliev
2020-12-10 13:23     ` Sergey Bronnikov
2020-12-10 13:29       ` Sergey Bronnikov
2020-12-07  7:46 ` [Tarantool-patches] [PATCH 2/6] test: remove dead code in Python tests end extra newline sergeyb
2020-12-09 20:20   ` Leonid Vasiliev
2020-12-07  7:46 ` [Tarantool-patches] [PATCH 3/6] test: remove empty print() functions sergeyb
2020-12-09 20:27   ` Leonid Vasiliev
2020-12-10 13:26     ` Sergey Bronnikov
2020-12-07  7:46 ` [Tarantool-patches] [PATCH 4/6] add initial flake8 config sergeyb
2020-12-09 20:57   ` Leonid Vasiliev
2020-12-07  7:46 ` [Tarantool-patches] [PATCH 5/6] cmake: add integration with flake8 sergeyb
2020-12-07  7:46 ` sergeyb [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ba10d3c0b982fbf30d2ccc47008fac91f6727a8.1607326642.git.sergeyb@tarantool.org \
    --to=sergeyb@tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=lvasiliev@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 6/6] ci: enable flake8' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox