Skip to content
This repository has been archived by the owner on Jan 27, 2020. It is now read-only.

Commit

Permalink
Merge pull request #621 from MaxUlysse/Tests
Browse files Browse the repository at this point in the history
Simplify tests
  • Loading branch information
maxulysse authored Aug 17, 2018
2 parents 5fbb5dc + b07b9d1 commit fed2e1d
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 44 deletions.
56 changes: 27 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,38 @@
sudo: required

language: java

jdk: openjdk8

services:
- docker
services: docker

addons:
apt:
update: true

env:
global:
- NXF_VER=0.31.0 SGT_VER=2.4.2
- NXF_VER=0.31.0 SGT_VER=2.5.1
matrix:
- PROFILE=singularity TEST=TOOLS TOOL_INSTALL=all
- PROFILE=singularity TEST=MANTA TOOL_INSTALL=all
- PROFILE=docker TEST=MANTA TOOL_INSTALL=nextflow
- PROFILE=docker TEST=TOOLS TOOL_INSTALL=nextflow
- PROFILE=docker TEST=ANNOTATEVEP TOOL_INSTALL=nextflow
- PROFILE=singularity TEST=ANNOTATESNPEFF TOOL_INSTALL=all
- PROFILE=singularity TEST=STEP TOOL_INSTALL=all
- PROFILE=singularity TEST=GERMLINE TOOL_INSTALL=all
- PROFILE=singularity TEST=DIR TOOL_INSTALL=all
- PROFILE=docker TEST=ANNOTATESNPEFF TOOL_INSTALL=nextflow
- PROFILE=docker TEST=STEP TOOL_INSTALL=nextflow
- PROFILE=docker TEST=GERMLINE TOOL_INSTALL=nextflow
- PROFILE=docker TEST=DIR TOOL_INSTALL=nextflow

install: # Install Nextflow (and Singularity if needed)
- "./scripts/install.sh --tool $TOOL_INSTALL"
- "travis_retry ./scripts/containers.sh --profile $PROFILE --test $TEST"

before_script: # Build references when needed
- "./scripts/test.sh --profile $PROFILE --test $TEST --build"

script:
- "./scripts/test.sh --profile $PROFILE --test $TEST"
- CE=singularity TEST=TOOLS
- CE=singularity TEST=MANTA
- CE=docker TEST=MANTA
- CE=docker TEST=TOOLS
- CE=docker TEST=ANNOTATEVEP
- CE=singularity TEST=ANNOTATESNPEFF
- CE=singularity TEST=STEP
- CE=singularity TEST=GERMLINE
- CE=singularity TEST=DIR
- CE=docker TEST=ANNOTATESNPEFF
- CE=docker TEST=STEP
- CE=docker TEST=GERMLINE
- CE=docker TEST=DIR

install:
# Install Nextflow (and Singularity if needed)
- "./scripts/install.sh --engine $CE"
# Donwload big containers for ANNOTATEVEP and ANNOTATESNPEF tests)
- "travis_retry ./scripts/containers.sh --profile $CE --test $TEST"

# Build references when needed
before_script: "./scripts/test.sh --profile $CE --test $TEST --build"

# Actual tests
script: "./scripts/test.sh --profile $CE --test $TEST"
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- [#608](https://github.com/SciLifeLab/Sarek/pull/608) - Update Nextflow required version
- [#616](https://github.com/SciLifeLab/Sarek/pull/616) - Update CHANGELOG
- [#615](https://github.com/SciLifeLab/Sarek/pull/615) - Use `splitCsv` instead of `readlines`
- [#621](https://github.com/SciLifeLab/Sarek/pull/621) - Improve install script
- [#621](https://github.com/SciLifeLab/Sarek/pull/621) - Simplify tests

### `Removed`
- [#616](https://github.com/SciLifeLab/Sarek/pull/616) - Remove old Issue Template

### `Fixed`
- [#621](https://github.com/SciLifeLab/Sarek/pull/621) - Fix VEP tests

## [2.1.0] - Ruotes - 2018-08-14

### `Added`
Expand Down
32 changes: 17 additions & 15 deletions scripts/install.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/bin/bash
set -euo pipefail

TOOL="all"
CONTAINER_ENGINE="singularity"

while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-t|--tool)
TOOL="$2"
-e|--engine)
CONTAINER_ENGINE="$2"
shift # past argument
shift # past value
;;
Expand All @@ -19,25 +19,27 @@ do
done

# Install Nextflow
if [[ "$TOOL" = nextflow ]] || [[ "$TOOL" = all ]]
then
cd $HOME
curl -fsSL get.nextflow.io | bash
chmod +x nextflow
sudo mv nextflow /usr/local/bin/
fi
mkdir /tmp/nextflow
cd /tmp/nextflow
wget -qO- get.nextflow.io | bash
sudo ln -s /tmp/nextflow/nextflow /usr/local/bin/nextflow

# Install Singularity
if [[ "$TOOL" = singularity ]] || [[ "$TOOL" = all ]]
if [[ "$CONTAINER_ENGINE" = singularity ]]
then
sudo apt-get install squashfs-tools
cd $HOME
if [[ "$SGT_VER" = '' ]]
then
SGT_VER=$(curl --silent "https://api.github.com/repos/Singularityware/Singularity/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")')
fi
sudo apt-get install libarchive-dev squashfs-tools
mkdir /tmp/singularity
cd /tmp/singularity
wget https://github.com/singularityware/singularity/releases/download/$SGT_VER/singularity-$SGT_VER.tar.gz
tar xvf singularity-$SGT_VER.tar.gz
cd singularity-$SGT_VER
./configure --prefix=/usr/local
make
sudo make install
cd ..
rm -rf singularity-$SGT_VER*
cd ${TRAVIS_BUILD_DIR}
rm -rf /tmp/singularity
fi

0 comments on commit fed2e1d

Please sign in to comment.