Skip to content

Commit

Permalink
TST: Trimmed travis setup from the mothership
Browse files Browse the repository at this point in the history
  • Loading branch information
mih committed Mar 29, 2018
1 parent 4ee24c4 commit 9bc499d
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .travis.yml
@@ -0,0 +1,71 @@
# vim ft=yaml
# travis-ci.org definition for DataLad build
language: python

python:
- 2.7
- 3.5
- 3.6

cache:
- apt

env:
global:
# will be used in the matrix, where neither other variable is used
- BOTO_CONFIG=/tmp/nowhere
- DATALAD_TESTS_SSH=1
- DATALAD_LOG_CMD_ENV=GIT_SSH_COMMAND
- TESTS_TO_PERFORM=
- NOSE_OPTS=-s
- NOSE_SELECTION_OP="not " # so it would be "not (integration or usecase)"
# Special settings/helper for combined coverage from special remotes execution
- COVERAGE=coverage
- DATALAD_DATASETS_TOPURL=http://datasets-tests.datalad.org


before_install:
# Just in case we need to check if nfs is there etc
- sudo lsmod
# The ultimate one-liner setup for NeuroDebian repository
- bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh)
- travis_retry sudo apt-get update -qq
- travis_retry sudo apt-get install eatmydata # to speedup some installations
- sudo eatmydata tools/ci/prep-travis-forssh-sudo.sh
- tools/ci/prep-travis-forssh.sh

install:
# Install standalone build of git-annex for the recent enough version
- travis_retry sudo eatmydata apt-get install zip pandoc
# for metadata support
- git config --global user.email "test@travis.land"
- git config --global user.name "Travis Almighty"
- cd ..; pip install -q codecov; cd -
- pip install -r requirements-devel.txt
#- pip install 'sphinx>=1.6.2'
# So we could test under sudo -E with PATH pointing to installed location
- sudo sed -i -e 's/^Defaults.*secure_path.*$//' /etc/sudoers

script:
# Verify that setup.py build doesn't puke
- python setup.py build
# Run tests
- http_proxy=
PATH=$PWD/tools/coverage-bin:$PATH
$NOSE_WRAPPER `which nosetests` $NOSE_OPTS
-v -A "$NOSE_SELECTION_OP(integration or usecase or slow)"
--with-doctest
--with-cov --cover-package datalad
--logging-level=INFO
$TESTS_TO_PERFORM
#- if [ ! "${DATALAD_LOG_LEVEL:-}" = 2 ]; then
# PYTHONPATH=$PWD $NOSE_WRAPPER make -C docs html doctest;
# fi
# Test installation system-wide
- sudo pip install .
# Report WTF information using system wide installed version
- datalad wtf

after_success:
- coverage combine -a /tmp/.coverage-entrypoints-*
- codecov
2 changes: 2 additions & 0 deletions README.md
@@ -1,5 +1,7 @@
# DataLad extension module template

[![Travis tests status](https://secure.travis-ci.org/datalad/datalad-module-template.png?branch=master)](https://travis-ci.org/datalad/datalad-module-template) [![codecov.io](https://codecov.io/github/datalad/datalad-module-template/coverage.svg?branch=master)](https://codecov.io/github/datalad/datalad-module-template?branch=master)

This repository contains a module template that can serve as a starting point
for implementing a [DataLad](http://datalad.org) extension. A module can
provide any number of additional DataLad commands that are automatically
Expand Down

0 comments on commit 9bc499d

Please sign in to comment.