From 40180db1d0db1f889867848a4e05362f5aacb3e0 Mon Sep 17 00:00:00 2001 From: Kevin Mader Date: Mon, 24 Sep 2018 11:49:17 +0200 Subject: [PATCH 1/5] Create robot_tests.yml using JYVE as an example of how to jupyter test --- build_tools/robot_tests.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 build_tools/robot_tests.yml diff --git a/build_tools/robot_tests.yml b/build_tools/robot_tests.yml new file mode 100644 index 0000000..a28f8d7 --- /dev/null +++ b/build_tools/robot_tests.yml @@ -0,0 +1,15 @@ +# taken from https://github.com/deathbeds/jyve/blob/9b25c2844a8cb1132e2c631b1e8b08cf76f44e5b/environment.yml +name: robot-tests + +channels: + - conda-forge + - defaults + +dependencies: + - geckodriver + - nodejs >=8.9.3,<9 + - python-chromedriver-binary + - robotframework-lint + - robotframework-seleniumlibrary + - selenium =3.8.0 + - wget From c0dedb6dfa067aa864577b49f60eef7a15b75ed8 Mon Sep 17 00:00:00 2001 From: Kevin Mader Date: Mon, 24 Sep 2018 12:23:10 +0200 Subject: [PATCH 2/5] Update .travis.yml adding install line --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index b8947f2..123a2a2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,11 +9,18 @@ cache: - $HOME/.cache/pip env: + global: + - MINICONDA_DIST=Miniconda3-4.5.4-Linux-x86_64.sh + - MINICONDA_SOURCE=https://repo.continuum.io/miniconda + - CONDA_DIR=$HOME/miniconda3 + - PATH=$CONDA_DIR/bin:$PATH + matrix: - TO_TEST=CODE - TO_TEST=NOTEBOOKS - TO_TEST=STYLE +before_install: ./build_tools/before_install.sh install: - pip install -e . - pip install pytest-cov codecov mypy flake8 nose From 74d50c2a5bb56bef5d0bd7cf54b9db53f137f367 Mon Sep 17 00:00:00 2001 From: Kevin Mader Date: Mon, 24 Sep 2018 12:23:44 +0200 Subject: [PATCH 3/5] Create before_install.sh adding before install scripts --- build_tools/before_install.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 build_tools/before_install.sh diff --git a/build_tools/before_install.sh b/build_tools/before_install.sh new file mode 100644 index 0000000..562c19c --- /dev/null +++ b/build_tools/before_install.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +set -ex +wget --no-verbose --continue ${MINICONDA_SOURCE}/${MINICONDA_DIST} +bash ${MINICONDA_DIST} -fbp ${CONDA_DIR} From fae481feb75f0230b524459266033452d71610f4 Mon Sep 17 00:00:00 2001 From: Kevin Mader Date: Mon, 24 Sep 2018 12:24:16 +0200 Subject: [PATCH 4/5] Update .travis.yml changing to source --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 123a2a2..d08d80f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ env: - TO_TEST=NOTEBOOKS - TO_TEST=STYLE -before_install: ./build_tools/before_install.sh +before_install: source build_tools/before_install.sh install: - pip install -e . - pip install pytest-cov codecov mypy flake8 nose From 01ce352f417d79661d5778061b9a366f6c05c8e8 Mon Sep 17 00:00:00 2001 From: Kevin Mader Date: Mon, 24 Sep 2018 19:10:38 +0200 Subject: [PATCH 5/5] Update .travis.yml adding 'BROWSER' step to the `TO_TEST` matrix to create and install all the needed packages --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d08d80f..e01f1a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,9 +19,14 @@ env: - TO_TEST=CODE - TO_TEST=NOTEBOOKS - TO_TEST=STYLE + - TO_TEST=BROWSER -before_install: source build_tools/before_install.sh +before_install: + - if [ "$TO_TEST" = "BROWSER" ]; then source build_tools/before_install.sh; fi + install: + - if [ "$TO_TEST" = "BROWSER" ]; then conda env update -n robot --file ${TRAVIS_BUILD_DIR}/build_tools/robot_tests.yml; fi + - if [ "$TO_TEST" = "BROWSER" ]; then source activate robot; fi - pip install -e . - pip install pytest-cov codecov mypy flake8 nose - if [ "$TO_TEST" = "NOTEBOOKS" ]; then pip install notebook nbconvert; fi