-
-
Notifications
You must be signed in to change notification settings - Fork 519
/
.travis.yml
134 lines (120 loc) · 3.11 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
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
127
128
129
130
131
132
133
134
dist: xenial # required for Python >= 3.7
os: linux
language: python
cache:
- pip
git:
depth: false
before_install:
- date
install:
- pip install poetry~=0.12.17
- poetry install
- poetry run python --version
script:
- poetry run behave
aliases:
test_mac: &test_mac
os: osx
language: shell
osx_image: xcode11.2
cache:
directories:
- $HOME/.pyenv/versions
before_install:
- eval "$(pyenv init -)"
- pyenv install -s $JRNL_PYTHON_VERSION
- pyenv global $JRNL_PYTHON_VERSION
- pip install --upgrade pip
- pip --version
test_windows: &test_windows
os: windows
language: shell
cache:
directories:
- /c/Python36
- /c/Python37
- /c/Python38
before_install:
- choco install python --version $JRNL_PYTHON_VERSION
- python -m pip install --upgrade pip
- pip --version
jobs:
fast_finish: true
allow_failures:
- python: nightly
- os: windows
include:
- stage: Lint & Tests
name: Lint, via Black
python: 3.8
# black is automatically installed by peotry
script:
- black --check . --verbose --diff
# Python 3.6 Tests
- name: Python 3.6 on Linux
python: 3.6
- <<: *test_mac
name: Python 3.6 on MacOS
python: 3.6
env:
- JRNL_PYTHON_VERSION=3.6.8
- <<: *test_windows
name: Python 3.6 on Windows
python: 3.6
env:
- JRNL_PYTHON_VERSION=3.6.8
- PATH=/c/Python36:/c/Python36/Scripts:$PATH
# Python 3.7 Tests
- name: Python 3.7 on Linux
python: 3.7
- <<: *test_mac
name: Python 3.7 on MacOS
python: 3.7
env:
- JRNL_PYTHON_VERSION=3.7.5
- <<: *test_windows
name: Python 3.7 on Windows
python: 3.7
env:
- JRNL_PYTHON_VERSION=3.7.5
- PATH=/c/Python37:/c/Python37/Scripts:$PATH
# Python 3.8 Tests
- name: Python 3.8 on Linux
python: 3.8
- <<: *test_mac
name: Python 3.8 on MacOS
python: 3.8
env:
- JRNL_PYTHON_VERSION=3.8.0
- <<: *test_windows
name: Python 3.8 on Windows
python: 3.8
env:
- JRNL_PYTHON_VERSION=3.8.0
- PATH=/c/Python38:/c/Python38/Scripts:$PATH
# ... and beyond!
- name: Python nightly on Linux
python: nightly
# Specialty tests
- name: Python 3.7 on Linux, not UTC
python: 3.7
env:
- TZ=America/Edmonton
- stage: Deploy
if: branch = master AND tag IS present
before_deploy:
- poetry config http-basic.pypi "$PYPI_USER" "$PYPI_PASS"
- poetry version "$TRAVIS_TAG"
- echo __version__ = \"$TRAVIS_TAG\" > jrnl/__version__.py
- poetry build
deploy:
- provider: script
script: poetry publish
after_deploy:
- git config --global user.email "jrnl.bot@gmail.com"
- git config --global user.name "Jrnl Bot"
- git checkout master
- git add pyproject.toml
- git commit -m "Incrementing version to ${TRAVIS_TAG}"
- git push https://${GITHUB_TOKEN}@github.com/jrnl-org/jrnl.git master