forked from psychoinformatics-de/datalad-hirni
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
86 lines (76 loc) · 2.79 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# vim ft=yaml
# travis-ci.org definition for DataLad build
language: python
git:
# we use submodules to be managed with datalad
submodules: false
python:
- 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
matrix:
- DATALAD_REPO_VERSION=7
- DATALAD_REPO_VERSION=5
- NOSE_SELECTION_OP=not
- NOSE_SELECTION_OP=""
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 git-annex with the relevant bits
# no recommends to avoid inheriting the entire multimedia stack
- travis_retry sudo eatmydata apt-get install --no-install-recommends git-annex-standalone aria2 git-remote-gcrypt lsof gnupg nocache singularity-container
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
# 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
# Test installation system-wide
- sudo pip install .
# install extras for doc building
- sudo pip install .[devel-docs]
# 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_hirni
--logging-level=INFO
$TESTS_TO_PERFORM
# Run doc examples
- $NOSE_WRAPPER tools/testing/run_doc_examples
- if [ ! "${DATALAD_LOG_LEVEL:-}" = 2 ]; then
PYTHONPATH=$PWD $NOSE_WRAPPER make -C docs html doctest;
fi
# Report WTF information using system wide installed version
- datalad wtf
after_success:
- coverage combine -a /tmp/.coverage-entrypoints-*
- codecov