From dc94a3bd618f74acdb3167141b26db31e0d06bee Mon Sep 17 00:00:00 2001 From: Derek Bekoe Date: Fri, 3 Nov 2017 14:02:23 -0700 Subject: [PATCH] CI for extension tests (#13) * Fix tests * No more allow failures * Allow failures for now --- .travis.yml | 6 +++--- scripts/ci/test_source.sh | 11 ++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 04627c374f7..217c6b29309 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ dist: trusty sudo: off language: python install: - - pip install pylint flake8 requests + - pip install pylint flake8 requests -q jobs: include: - stage: verify @@ -15,11 +15,11 @@ jobs: python: 3.6 - stage: verify env: PURPOSE='SourceTests' - script: python ./scripts/ci/test_source.sh + script: ./scripts/ci/test_source.sh python: 2.7 - stage: verify env: PURPOSE='SourceTests' - script: python ./scripts/ci/test_source.sh + script: ./scripts/ci/test_source.sh python: 3.6 - stage: verify env: PURPOSE='IndexVerify' diff --git a/scripts/ci/test_source.sh b/scripts/ci/test_source.sh index 98dfad2cca9..da99936ba45 100755 --- a/scripts/ci/test_source.sh +++ b/scripts/ci/test_source.sh @@ -1,7 +1,16 @@ #!/usr/bin/env bash set -e +# Install CLI & CLI testsdk +echo "Installing azure-cli-testsdk and azure-cli..." +pip install "git+https://github.com/Azure/azure-cli@dev#egg=azure-cli-testsdk&subdirectory=src/azure-cli-testsdk" -q +echo "Installed." + for d in src/*/azext_*/tests; do echo "Running tests for $d"; - python -m unittest discover -v $d; + if [ -d $d ]; then + python -m unittest discover -v $d; + else + echo "Skipped $d as not a directory." + fi done;