From c635eb78e59231019988903acbc317d79e8f9a37 Mon Sep 17 00:00:00 2001 From: Mateus Lisboa Date: Sat, 26 Mar 2022 14:40:01 -0300 Subject: [PATCH 1/4] add flake8 dependence --- ThoughtsBackend/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ThoughtsBackend/requirements.txt b/ThoughtsBackend/requirements.txt index cd3af73..931846a 100644 --- a/ThoughtsBackend/requirements.txt +++ b/ThoughtsBackend/requirements.txt @@ -10,4 +10,4 @@ pyjwt==1.7.1 cryptography==2.6.1 parse==1.12.0 psycopg2==2.8.2 -Werkzeug==0.16.1 +flake8==3.7.7 \ No newline at end of file From a1878977dbf3aae2cf962deef0ceeffec802081a Mon Sep 17 00:00:00 2001 From: Mateus Lisboa Date: Sat, 26 Mar 2022 15:14:04 -0300 Subject: [PATCH 2/4] add Werkzeug on requirementes --- ThoughtsBackend/requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ThoughtsBackend/requirements.txt b/ThoughtsBackend/requirements.txt index 931846a..ec6707f 100644 --- a/ThoughtsBackend/requirements.txt +++ b/ThoughtsBackend/requirements.txt @@ -10,4 +10,5 @@ pyjwt==1.7.1 cryptography==2.6.1 parse==1.12.0 psycopg2==2.8.2 -flake8==3.7.7 \ No newline at end of file +flake8==3.7.7 +Werkzeug==0.16.1 \ No newline at end of file From bec22ac5dda2edb6a495e82054c8405ae03645fa Mon Sep 17 00:00:00 2001 From: Mateus Lisboa Date: Sat, 26 Mar 2022 15:14:23 -0300 Subject: [PATCH 3/4] refactore code as flake8 --- ThoughtsBackend/tests/constants.py | 1 - ThoughtsBackend/thoughts_backend/api_namespace.py | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ThoughtsBackend/tests/constants.py b/ThoughtsBackend/tests/constants.py index 3dc1161..0f895b3 100644 --- a/ThoughtsBackend/tests/constants.py +++ b/ThoughtsBackend/tests/constants.py @@ -38,4 +38,3 @@ KwIDAQAB -----END PUBLIC KEY----- ''' - diff --git a/ThoughtsBackend/thoughts_backend/api_namespace.py b/ThoughtsBackend/thoughts_backend/api_namespace.py index 637d552..09bb6af 100644 --- a/ThoughtsBackend/thoughts_backend/api_namespace.py +++ b/ThoughtsBackend/thoughts_backend/api_namespace.py @@ -79,8 +79,9 @@ def post(self): search_parser = api_namespace.parser() + search_parser.add_argument('search', type=str, required=False, - help='Search in the text of the thoughts') + help='Search in the text of the thoughts') @api_namespace.route('/thoughts/') From 28dec818c313ee4c677849f614be71fb252fa6d4 Mon Sep 17 00:00:00 2001 From: Mateus Lisboa Date: Sun, 27 Mar 2022 15:43:47 -0300 Subject: [PATCH 4/4] modify travis.yml to run jobs in parallel --- .travis.yml | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index f5aa97c..4a7af61 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,13 +13,29 @@ before_install: - docker --version - docker-compose version -script: -- docker-compose build db -- docker-compose build static-analysis -- docker-compose build test-postgresql -- docker-compose run test-postgresql -- docker-compose run static-analysis +# desable script to use jobs. Then the process will be execute in parallel +#script: +#- docker-compose build db +#- docker-compose build static-analysis +#- docker-compose build test-postgresql +#- docker-compose run test-postgresql +#- docker-compose run static-analysis + +jobs: + include: + - stage: tests + name: "Unit Tests" + script: + - docker-compose build db + - docker-compose build test-postgresql + - docker-compose run test-postgresql + + - stage: tests + name: "Static Analysis" + script: + - docker-compose build static-analysis + - docker-compose run static-analysis