From 8f4588767a2d834dfe8ed3ba8f9f705cbae1fc58 Mon Sep 17 00:00:00 2001 From: Laurence de Bruxelles Date: Tue, 19 Feb 2019 09:48:14 +0000 Subject: [PATCH] Use Makefile with Travis CI `scripts/run_test.sh` is old and deprecated --- .travis.yml | 4 ++-- scripts/run_tests.sh | 21 --------------------- 2 files changed, 2 insertions(+), 23 deletions(-) delete mode 100755 scripts/run_tests.sh diff --git a/.travis.yml b/.travis.yml index ea1f4ad6..ff699c11 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,9 @@ python: - "3.6" install: - export BOTO_CONFIG=/dev/null - - pip install -r requirements-dev.txt + - make requirements-dev script: - - ./scripts/run_tests.sh --cov=dmutils --cov-report=term-missing + - make test PYTEST_ARGS="--cov=dmutils --cov-report=term-missing" after_success: - coveralls notifications: diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh deleted file mode 100755 index 8ce9800e..00000000 --- a/scripts/run_tests.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -set -o pipefail - -function display_result { - RESULT=$1 - EXIT_STATUS=$2 - TEST=$3 - - if [ $RESULT -ne 0 ]; then - echo -e "\033[31m$TEST failed\033[0m" - exit $EXIT_STATUS - else - echo -e "\033[32m$TEST passed\033[0m" - fi -} - -flake8 . -display_result $? 1 "Code style check" - -py.test $@ -display_result $? 2 "Unit tests"