forked from sdispater/pendulum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
81 lines (73 loc) · 2.05 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
language: python
stages:
- linting
- test
cache:
pip: true
directories:
- $HOME/.cache/pypoetry
jobs:
fast_finish: true
include:
- python: 2.7
env: PENDULUM_EXTENSIONS=1
- python: 2.7
env: PENDULUM_EXTENSIONS=0
- python: 3.4
env: PENDULUM_EXTENSIONS=1
- python: 3.4
env: PENDULUM_EXTENSIONS=0
- python: 3.5
env: PENDULUM_EXTENSIONS=1
- python: 3.5
env: PENDULUM_EXTENSIONS=0
- python: 3.6
env: PENDULUM_EXTENSIONS=1
- python: 3.6
env: PENDULUM_EXTENSIONS=0
- python: 3.7
dist: xenial
env: PENDULUM_EXTENSIONS=1
- python: 3.7
dist: xenial
env: PENDULUM_EXTENSIONS=0
- python: pypy
- python: pypy3
- stage: linting
python: "3.6"
install:
- pip install pre-commit
- pre-commit install-hooks
script:
- pre-commit run --all-files
allow_failures:
- python: pypy
- python: pypy3
before_install:
- pip install codecov
install:
- |
if [ "$TRAVIS_PYTHON_VERSION" = "pypy" ]; then
export PYENV_ROOT="$HOME/.pyenv"
if [ -f "$PYENV_ROOT/bin/pyenv" ]; then
pushd "$PYENV_ROOT" && git pull && popd
else
rm -rf "$PYENV_ROOT" && git clone --depth 1 https://github.com/yyuu/pyenv.git "$PYENV_ROOT"
fi
export PYPY_VERSION="5.6.0"
"$PYENV_ROOT/bin/pyenv" install --skip-existing "pypy-$PYPY_VERSION"
virtualenv --python="$PYENV_ROOT/versions/pypy-$PYPY_VERSION/bin/python" "$HOME/virtualenvs/pypy-$PYPY_VERSION"
source "$HOME/virtualenvs/pypy-$PYPY_VERSION/bin/activate"
fi
- pip install pip -U
- curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
- source $HOME/.poetry/env
- poetry install -v
- poetry build -v
- |
if [ "$PENDULUM_EXTENSIONS" == "1" ]; then
find dist/ -iname pendulum*.whl -exec unzip -o {} 'pendulum/*' -d . \;
fi
script: poetry run pytest --cov=pendulum --cov-config=.coveragerc tests/ -W ignore
after_success:
- codecov