From 4d1621dd1eb17a60838ec71de8a3fa5198c9c25f Mon Sep 17 00:00:00 2001 From: "hauke.schulz" <43613877+observingClouds@users.noreply.github.com> Date: Wed, 9 Oct 2019 17:40:18 -0700 Subject: [PATCH] + Initial Travis CI --- .travis.yml | 51 ++++++++++++++++++++++++++++++++++++++++++++ dev-requirements.txt | 0 2 files changed, 51 insertions(+) create mode 100644 .travis.yml create mode 100644 dev-requirements.txt diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ea39c7c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,51 @@ +language: python + +matrix: + # This will launch a separate build for each Python version you add + # Feel free to add extra environment variables as needed + include: + - python: 3.5 + - python: 3.6 + +before_install: + # Install the latest version of Miniconda + - wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh + - chmod +x miniconda.sh + - ./miniconda.sh -b + - export PATH=/home/travis/miniconda/bin:$PATH + - conda update --yes conda # Update CONDA without command line prompt + +install: + - conda install conda-build + # You can add any CONDA channels you may need here. CONDA supports + # both the commands add and append. The only difference is that + # the add command places the channel at the front of the priority + # list, while append does the opposite. + - conda config --add channels conda-forge + + # Build the conda recipe for this package + - conda build -q conda-recipe --python=$TRAVIS_PYTHON_VERSION --output-folder bld-dir + # Add the built package as a channel with highest priority + - conda config --add channels "file://`pwd`/bld-dir" + + # Create and activate the test environment + - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION eurec4a_snd --file dev-requirements.txt + - source activate test-environment + +script: + # Run any test suite you may have + - echo "Currently no tests implemented" + +after_success: + # Install the command line API for CONDA uploads + - conda install anaconda-client + - | + # Only upload builds from tags + if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_REPO_SLUG == "org/pkgname" + && $TRAVIS_BRANCH == $TRAVIS_TAG && $TRAVIS_TAG != '' ]]; then + export ANACONDA_API_TOKEN=$CONDA_UPLOAD_TOKEN + + #conda convert --platform all $HOME/miniconda3/bld-dir/linux-64/PACKAGENAME-*.tar.bz2 --output-dir bld-dir/ + + anaconda upload bld-dir/**/PACKAGENAME-*.tar.bz2 + fi \ No newline at end of file diff --git a/dev-requirements.txt b/dev-requirements.txt new file mode 100644 index 0000000..e69de29