Skip to content

Commit

Permalink
Improve the Travis CI build
Browse files Browse the repository at this point in the history
It now tests both the Java projects and the Jupyter notebooks.

This is a first cut at addressing #53.
  • Loading branch information
ctrueden committed May 23, 2018
1 parent 4d605bb commit 5adbf64
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 28 deletions.
16 changes: 13 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
language: java
language:
- java
- python
jdk: oraclejdk8
python:
- "3.5"
branches:
only: master
install: true
only:
- master
- "/.*-[0-9]+\\..*/"
install: ".travis/install.sh"
script: ".travis/build.sh"
cache:
directories:
- "~/.m2/repository"
- "~/miniconda"
env:
global:
- secure: bM/ROC4gfw5dwe7hvcpdFTNBRx51wIvQ+atUPhf9jZjBRidI5Wr0Rhsc30HUAF0sWh4tw2qkCjPAioC/84jp2tVqUXM0PqiElLunVdf6ooJ09uBkTr3nUTdSWflEpKqrI4DPfBS317Xoj26GdWu6YaPLlpQDIPMgdMjZG9fUJRE=
Expand Down
13 changes: 2 additions & 11 deletions .travis/build.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
#!/bin/sh
dir=$(cd "$(dirname "$0")" && pwd)
if [ "$TRAVIS_SECURE_ENV_VARS" = true \
-a "$TRAVIS_PULL_REQUEST" = false \
-a "$TRAVIS_BRANCH" = master ]
then
cd maven-projects &&
mvn -Pdeploy-to-imagej deploy --settings "$dir/settings.xml"
else
cd maven-projects &&
mvn install
fi
curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/master/travis-build.sh
sh travis-build.sh $encrypted_4bf550f17d15_key $encrypted_4bf550f17d15_iv
17 changes: 17 additions & 0 deletions .travis/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh
CONDA_DIR=$HOME/miniconda
if [ ! -d "$CONDA_DIR" ]; then
if [ "$TRAVIS_PYTHON_VERSION" = "2.7" ]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
fi
bash miniconda.sh -b -p "$CONDA_DIR"
fi
export PATH="$CONDA_DIR/bin:$PATH"
hash -r
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda info -a
conda env create -n test-environment python="$TRAVIS_PYTHON_VERSION" -f environment.yml
source activate test-environment
14 changes: 0 additions & 14 deletions .travis/settings.xml

This file was deleted.

0 comments on commit 5adbf64

Please sign in to comment.