-
Notifications
You must be signed in to change notification settings - Fork 652
/
config.yml
119 lines (101 loc) · 2.91 KB
/
config.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
version: 2
jobs:
tests:
docker:
- image: circleci/python:3.6-stretch
steps:
# Get our data and merge with upstream
- run: sudo apt-get update
- checkout
- restore_cache:
keys:
- cache-pip
- run: pip install --user .[testing]
- save_cache:
key: cache-pip
paths:
- ~/.cache/pip
# Make sure tests build in CircleCI (so we can preview w/ SSH if we wish)
- run:
name: Run pytest
command: pytest --ignore=tests/test_pdf.py
pdfhtml:
docker:
- image: circleci/python:3.6-stretch
steps:
- run: sudo apt-get update
- checkout
- restore_cache:
keys:
- cache-pip
- run: pip install --user .[testing,pdfhtml]
- save_cache:
key: cache-pip
paths:
- ~/.cache/pip
- run:
name: Install Headless Chrome dependencies
command: |
sudo apt-get install -yq $(cat .github/workflows/pyppeteer_reqs.txt)
- run:
name: Install chromium
command: pyppeteer-install
- run:
name: Run pytest for pdfhtml
command: pytest tests/test_pdf.py::test_pdfhtml
# Build a PDF of the book to view as an artifact
- run:
name: PDF from HTML
command: jb build docs --builder pdfhtml
- store_artifacts:
path: docs/_build/pdf/book.pdf
destination: pdf
pdflatex:
docker:
- image: circleci/python:3.6-stretch
steps:
- run: sudo apt-get update
- checkout
- restore_cache:
keys:
- cache-pip
- run: pip install --user .[testing,pdflatex]
- save_cache:
key: cache-pip
paths:
- ~/.cache/pip
- restore_cache:
keys:
- texlive
- run:
name: Install texlive
command: |
bash scripts/install_latex.sh
echo 'export PATH=/tmp/texlive/bin/x86_64-linux:$PATH' >> $BASH_ENV
source /home/circleci/.bashrc
- save_cache:
key: texlive
paths:
- /tmp/texlive
- run:
name: Run pytest for pdflatex
command: pytest tests/test_pdf.py::test_pdflatex
# Build quantecon-mini-example project as a test case
# TODO: revert this to building docs/ when we've added support for svg, gif, etc
- run:
name: PDF from LaTeX
command: |
git clone https://github.com/executablebooks/quantecon-mini-example.git
cd quantecon-mini-example/
pip install -r requirements.txt
jb build mini_book --builder pdflatex
- store_artifacts:
path: quantecon-mini-example/mini_book/_build/latex/book.pdf
destination: pdflatex
workflows:
version: 2
default:
jobs:
- tests
- pdfhtml
- pdflatex