-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
51 lines (43 loc) · 1.24 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
sudo: required
dist: xenial
language: python
python:
- "3.6"
- "3.7"
env:
global:
- TEST_POOL="zpool"
- PYTEST_DATASET="pyzfscmds/tests"
- ZDISKS_SUBDIR="zfstests"
- ZPOOL_MOUNTPOINT="/zpool"
cache:
pip: true
custom_install: true
before_install:
- sudo scripts/travis/ubuntu/setup_zfs_requirements.sh
- sudo scripts/travis/common/create_test_root.sh
- |
for e in $(echo "${TRAVIS_COMMIT_MESSAGE}" | grep -P -o '(?<=\[).*?(?=\])'); do
export ${e} && echo "set environment variable: ${e}";
done
branches:
only:
- /.*/ # Build all branches
install:
- python setup.py install
- pip install '.[test]'
script:
- |
sudo env "PATH=$PATH" \
pytest --cov=pyzfscmds tests \
--unsafe \
--zpool="${TEST_POOL}" \
--test-dataset="${PYTEST_DATASET}" \
--root-dataset="${TEST_POOL}/ROOT/default" \
--zpool-root-mountpoint="${ZPOOL_MOUNTPOINT}/root" \
--zfs-version="$(modinfo zfs | grep -iw version | awk '{print $2}')"
after_script:
- sudo zfs list
- modinfo zfs | grep -iw version
- modinfo spl | grep -iw version
- sudo env "PATH=$PATH" pytest --codestyle