forked from datalad/datalad-metalad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
95 lines (87 loc) · 3.41 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
87
88
89
90
91
92
93
94
95
# vim ft=yaml
# travis-ci.org definition for DataLad build
language: python
python:
- 3.5
- 3.7
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:
include:
- python: 3.5
env:
# eventually: - TMPDIR="/var/tmp/sym ссылка"
- TMPDIR="/var/tmp/sym link"
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
# prep for SSH network access
- sudo bash -c 'echo "127.0.0.1 datalad-test" >> /etc/hosts'
- travis_retry sudo eatmydata apt-get install openssh-client
- mkdir -p ~/.ssh
- echo -e "Host localhost\n\tStrictHostKeyChecking no\n\tIdentityFile /tmp/dl-test-ssh-id\nHost datalad-test\n\tStrictHostKeyChecking no\n\tIdentityFile /tmp/dl-test-ssh-id\n" >> ~/.ssh/config
- ssh-keygen -f /tmp/dl-test-ssh-id -N ""
- cat /tmp/dl-test-ssh-id.pub >> ~/.ssh/authorized_keys
- bash -c 'eval $(ssh-agent) && ssh-add /tmp/dl-test-ssh-id'
- ssh -v localhost exit
- ssh -v datalad-test exit
# 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
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 "[email protected]"
- git config --global user.name "Travis Almighty"
- cd ..; pip install -q codecov; cd -
- pip install -r requirements.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
# TMPDIRs
- if [[ "${TMPDIR:-}" =~ .*/sym\ link ]]; then echo "Symlinking $TMPDIR"; ln -s /tmp "$TMPDIR"; fi
- if [[ "${TMPDIR:-}" =~ .*/d\ i\ r ]]; then echo "mkdir $TMPDIR"; mkdir -p "$TMPDIR"; fi
script:
# Verify that setup.py build doesn't puke
- python setup.py build
# Test installation system-wide
- sudo pip install .
# Run tests
- http_proxy=
PATH=$PWD/tools/coverage-bin:$PATH
$NOSE_WRAPPER `which nosetests` $NOSE_OPTS
-v
--with-doctest
--with-cov --cover-package datalad_metalad
--logging-level=INFO
$TESTS_TO_PERFORM
# Imports should be relative
- if grep -r -e '\(from\|import\)\s\s*datalad_metalad' datalad_metalad; then
echo Convert absolute imports to relative;
exit 1;
fi
#- 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