-
Notifications
You must be signed in to change notification settings - Fork 14
/
.travis.yml
73 lines (73 loc) · 2.91 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
# os: linux and sudo: false is assumed, which means it is using container-based Ubuntu
language: python
cache: pip
dist: xenial # required for Python >= 3.7
# build matrix: different python and pandoc versions
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
- "3.7"
- "3.7-dev" # 3.7 development branch
- "3.8-dev" # 3.8 development branch
- "nightly" # Travis CI supports a special version name nightly, which points to a recent development version of CPython build
# pypy (version info from [Changelogs — PyPy documentation](http://doc.pypy.org/en/latest/index-of-whatsnew.html))
- "pypy"
- "pypy3"
# https://groups.google.com/forum/?fromgroups#!topic/pandoc-discuss/uGASAhRydfI
env:
- pandocVersion=1.19.2.1
- pandocVersion=latest
matrix:
allow_failures:
# - python: "3.6-dev"
# - python: "3.7-dev"
# - python: "nightly"
# - python: "pypy3"
fast_finish: true
# download pandoc
before_install:
- |
if [[ $pandocVersion == "latest" ]]; then
url="https://github.com/jgm/pandoc/releases/latest"
else
url="https://github.com/jgm/pandoc/releases/tag/$pandocVersion"
fi
path=$(curl -L $url | grep -o '/jgm/pandoc/releases/download/.*-amd64\.deb')
downloadUrl="https://github.com$path"
file=${path##*/}
# install dependencies
install:
# pandoc
- wget $downloadUrl &&
sudo dpkg -i $file
- pip install -e .
before_script:
# pasteurize for py2 only (disabled because Python code is currently universal as-written)
# - |
# if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" || "$TRAVIS_PYTHON_VERSION" == "pypy" ]]; then
# pasteurize -wn ./pandoc_mustache/pandoc_mustache.py
# fi
# commands to run tests
script:
- pytest
before_deploy:
# create README.rst for PyPI README
- pandoc -f markdown+autolink_bare_uris-fancy_lists-implicit_header_references -M date="`date "+%B %e, %Y"`" --toc -s -o README.rst README.md
# debugging rst output
## install dependencies for rst to html
- pip install -e .[pypi]
## test if the rst output is valid
- rst2html.py README.rst > README.html
deploy:
provider: pypi
user: michaelstepner
password:
secure: HI/2sdV0lcuZ9llZr5TUfxVASz8hYjYdehvxRKKKrVBeBIfaIOus6Cysh5hRorqy/wssXy4tA3Q+SzqElhbv1NECjfzWyGqwSiZWwvz5wiAFQlHVVvG98kcCJDXqI3ez8BHJgCz8WSPu5jeBHGhwweJk3DIGw4vhZRcsN+tzWSlPkyZ4TizGoSEF2P4P7k+ostryPID75lQ71LgAyE/vzbdkqmJvZ/UY9OHZU17n1xYTxpKV+bKAQoHh+TWulb7fiGP0QiZdi96meDU9huJIsjBDSJj71WGAir3lh/96itM+kHNgPn5A7Q9LwH207tVtMQOD3cxWvaDnpFmXJH8e0xWsyQv3zS1sH10X+3PoM6xAOh42eCOKYjrloF/6C52TOlieBVzT1l3siCk/fg72x/aqffwkluz9VMUDQC05abbyewTBFPLOdn40vhy6nw8tuXlR5ahBj8YUVEdU5dMMLR3tDtFTMBAnAALi2vTtSvZL2uYooFjUQ0e7csiSl7dVJvnkHNNTGw08q0u1MZK1D1tpgZk/bnFzrBHwEQVt18/GLIbompam9OWFTnGsAfDngBxiNW51HkztTuieVPyCKyWJTvg8xTynqqNj2Juva/DvkzNPH6LBj5WCM61wbR9LO6EMUvK5ihUu2YTw3enwGHD77d08G5eyWkPpYFWcBMA=
distributions: sdist bdist_wheel
skip_cleanup: true
on:
tags: true
python: '3.6'
condition: "$pandocVersion = latest"