Skip to content

Commit

Permalink
+ Initial Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
observingClouds committed Oct 10, 2019
1 parent 0b3fa9b commit 4d1621d
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
Empty file added dev-requirements.txt
Empty file.

0 comments on commit 4d1621d

Please sign in to comment.