From 373cb07b28551c4d27c44d7491d4182ecf21f101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 31 Jan 2019 15:55:45 +0100 Subject: [PATCH] update .travis.yml and run_tests.sh - add python3.8 and pypy3 builds - remove deprecated 'sudo: true' and 'sudo: false' - enable builds for 'test-...' branches --- .travis.yml | 7 +++++-- scripts/run_tests.sh | 8 +++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index cb386e51..a1c1942f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,23 +3,26 @@ python: - "3.4" - "3.5" - "3.6" + - "pypy3" env: - GALLERYDL_TESTS=core matrix: include: - python: "3.7" dist: xenial - sudo: true + - python: "3.8-dev" + dist: xenial - python: "3.6" env: GALLERYDL_TESTS=results -sudo: false git: depth: 3 + quiet: true branches: only: - master - /^v\d+\.\d+\.\d+(-\S*)?$/ + - /^test(-\w+)+$/ script: - ./scripts/run_tests.sh diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh index 55ef84d4..334671e1 100755 --- a/scripts/run_tests.sh +++ b/scripts/run_tests.sh @@ -1,14 +1,16 @@ #!/bin/bash +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + TESTS_CORE=(config cookies downloader extractor oauth text util) TESTS_RESULTS=(results) # select tests -TESTS=() -case "${GALLERYDL_TESTS}" in +case "${1:-${GALLERYDL_TESTS:-core}}" in core) TESTS=( ${TESTS_CORE[@]} );; results) TESTS=( ${TESTS_RESULTS[@]} );; + *) TESTS=( );; esac @@ -19,4 +21,4 @@ TESTS=( ${TESTS[@]/%/.py} ) # run 'nosetests' with selected tests # (or all tests if ${TESTS} is empty) -nosetests --verbose -w test ${TESTS[@]} +nosetests --verbose -w "${DIR}/../test" ${TESTS[@]}