forked from psychoinformatics-de/datalad-debian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
126 lines (95 loc) · 4.17 KB
/
.appveyor.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# The aim of this test setup is to create a "native" platform experience, using
# as few cross-platform helper tools as possible.
#
# A virtualenv is used for testing. The effective virtual env
# is available under ~/VENV.
#
# All workers support remote login. Login details are shown at the top of each
# CI run log.
#
# - A permitted SSH key must be defined in an APPVEYOR_SSH_KEY environment
# variable (via the appveyor project settings)
#
# - SSH login info is given in the form of: 'appveyor@67.225.164.xx -p 22xxx'
#
# - Login with:
#
# ssh -o StrictHostKeyChecking=no <LOGIN>
#
# - to prevent the CI run from exiting, `touch` a file named `BLOCK` in the
# user HOME directory (current directory directly after login). The session
# will run until the file is removed (or 60 min have passed)
# make repository clone cheap
shallow_clone: true
environment:
DATALAD_TESTS_SSH: 1
# The ID variable had no impact, but sorts first in the CI run overview
# an intelligible name can help to locate a specific test run
matrix:
- ID: Ubu20
DTS: datalad_debian
APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
INSTALL_SYSPKGS: python3-virtualenv
# system git-annex is way too old, use better one
INSTALL_GITANNEX: git-annex -m deb-url --url http://ftp.us.debian.org/debian/pool/main/g/git-annex/git-annex_8.20201127-1_amd64.deb
# it is OK to specify paths that may not exist for a particular test run
cache:
# pip cache
- /home/appveyor/.cache/pip -> .appveyor.yml
# turn of support for MS project build support (not needed)
build: off
# init cannot use any components from the repo, because it runs prior to
# cloning it
init:
# enable external SSH access to CI worker on all other systems
# needs APPVEYOR_SSH_KEY defined in project settings (or environment)
- sh: curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e -
# Identity setup
- git config --global user.email "test@appveyor.land"
- git config --global user.name "Appveyor Almighty"
- sh: mkdir ~/DLTMP
- sh: export TMPDIR=~/DLTMP
# deploy the datalad installer
- appveyor DownloadFile https://raw.githubusercontent.com/datalad/datalad-installer/master/src/datalad_installer.py -FileName datalad_installer.py
install:
# If a particular Python version is requested, use env setup (using the
# appveyor provided environments/installation). Note, these are broken
# on the ubuntu images
# https://help.appveyor.com/discussions/problems/28217-appveyor-ubunu-image-with-python3-lzma-module
# Otherwise create a virtualenv using the default Python 3, to enable uniform
# use of python/pip executables below
- sh: "[ \"x$PY\" != x ] && . ${HOME}/venv${PY}/bin/activate || virtualenv -p 3 ${HOME}/dlvenv && . ${HOME}/dlvenv/bin/activate; ln -s \"$VIRTUAL_ENV\" \"${HOME}/VENV\""
- cmd: "set PATH=C:\\Python%PY%;C:\\Python%PY%\\Scripts;%PATH%"
# Missing system software
- sh: "[ -n \"$INSTALL_SYSPKGS\" ] && ( [ \"x${APPVEYOR_BUILD_WORKER_IMAGE}\" = \"xmacOS\" ] && brew install -q ${INSTALL_SYSPKGS} || sudo apt-get install --no-install-recommends -y ${INSTALL_SYSPKGS} ) || true"
# deploy git-annex, if desired
- sh: "[ -n \"${INSTALL_GITANNEX}\" ] && python datalad_installer.py ${INSTALL_GITANNEX}"
#before_build:
#
build_script:
- pip install -r requirements-devel.txt
- pip install .
#after_build:
#
before_test:
- datalad wtf
test_script:
# run tests on installed module, not source tree files
- cmd: md __testhome__
- sh: mkdir __testhome__
- cd __testhome__
# run test selecion (--traverse-namespace needed from Python 3.8 onwards)
- cmd: python -m nose --traverse-namespace -s -v -A "not (turtle)" --with-cov --cover-package datalad_debian %DTS%
- sh: python -m nose --traverse-namespace -s -v -A "not (turtle)" --with-cov --cover-package datalad_debian ${DTS}
after_test:
# prepare coverage.xml in a separate invocation.
# if invoked directly with nose - do not include test_ files themselves
- python -m coverage xml
- sh: bash <(curl -s https://codecov.io/bash)
#on_success:
#
#on_failure:
#
on_finish:
# conditionally block the exit of a CI run for direct debugging
- sh: while [ -f ~/BLOCK ]; do sleep 5; done