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 diff --git a/ThoughtsBackend/requirements.txt b/ThoughtsBackend/requirements.txt index cd3af73..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 -Werkzeug==0.16.1 +flake8==3.7.7 +Werkzeug==0.16.1 \ No newline at end of file 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/')