-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
71 lines (65 loc) · 2.16 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
# Only build PRs or tags
if: (type = pull_request) OR (tag IS present)
os:
- windows
- linux
- osx
dist: bionic
osx_image: xcode11.3
language: shell
notifications:
email: false
git:
submodules: false
# Install packages
install:
- _py_ver="3.8"
- |
if [ "$TRAVIS_OS_NAME" = 'windows' ]; then
choco install miniconda3
_pref="/c/tools/miniconda3"
export PATH="$_pref:$_pref/Scripts:$_pref/condabin:$PATH"
elif [ "$TRAVIS_OS_NAME" = 'osx' ]; then
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
else
sudo apt-get update
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
fi
- hash -r
- source activate base
- conda config --set always_yes yes --set changeps1 no
- conda config --add channels conda-forge
- conda config --add channels defaults
- conda update -y conda
# Useful for debugging any issues with conda
- conda info -a
- |
conda create -y -n test-knitty "python=$_py_ver" "pip>=10.0.1" \
jupyter_core traitlets ipython jupyter_client nbconvert pandocfilters "py-pandoc>=2.6" click psutil "panflute>=1.11.2" pyyaml "shutilwhich-cwdpatch>=0.1.0" ipykernel \
pytest pytest-cov pandas matplotlib sphinx sphinx_rtd_theme ghp-import
- source activate test-knitty
- jupyter kernelspec list
- pip install -e .[dev]
# Run test
script:
- "pandoc-filter-arg --help"
- "pre-knitty --help"
- "knitty --help"
- "pandoc-filter-arg -o doc.pdf"
- |
printf "@{eval=True, echo=True}\n\`\`\`python\nprint(0)\n\`\`\`\n" |
pre-knitty |
pandoc -t json |
knitty markdown |
pandoc -f json -t markdown
- |
printf "![Caption](https://avatars0.githubusercontent.com/u/11897326?s=70&v=4)" |
pandoc -t json |
panfl -t markdown knitty.self_contained_raw_html_img |
pandoc -f json -t markdown
- "py.test tests --cov=knitty --cov-report html"
- "py.test tests2 --cov=knitty --cov-report html"