Skip to content

Commit 641e7a8

Browse files
committed
CI: Bump tested pandoc integration from v2 to v3
1 parent 26c98f5 commit 641e7a8

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
pip install flake8 coverage mypy types-Markdown
3434
sudo apt update && sudo apt-get install \
3535
texlive-xetex lmodern texlive-fonts-recommended # test_pdf_pandoc
36-
wget -O/tmp/pandoc.deb https://github.com/jgm/pandoc/releases/download/2.10/pandoc-2.10-1-amd64.deb && sudo dpkg -i /tmp/pandoc.deb
36+
wget -O/tmp/pandoc.deb https://github.com/jgm/pandoc/releases/download/3.1.12.2/pandoc-3.1.12.2-1-amd64.deb && sudo dpkg -i /tmp/pandoc.deb
3737
3838
- run: find -name '*.md' | xargs .github/lint-markdown.sh
3939
- run: flake8 pdoc setup.py
@@ -42,6 +42,10 @@ jobs:
4242
- run: bash <(curl -s https://codecov.io/bash)
4343
- run: coverage report
4444
- run: PDOC_TEST_PANDOC=1 time python -m unittest -v pdoc.test.CliTest.test_pdf_pandoc
45+
- uses: actions/upload-artifact@v3
46+
with:
47+
name: Pdoc Documentation.pdf
48+
path: /tmp/pdoc.pdf
4549

4650
docs:
4751
runs-on: ubuntu-latest

pdoc/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ def docfilter(obj, _filters=args.filter.strip().split(',')):
593593
pandoc --metadata=title:"MyProject Documentation" \\
594594
--from=markdown+abbreviations+tex_math_single_backslash \\
595595
--pdf-engine=xelatex --variable=mainfont:"DejaVu Sans" \\
596-
--toc --toc-depth=4 --output=pdf.pdf pdf.md\
596+
--toc --toc-depth=4 --output=/tmp/pdoc.pdf pdf.md
597597
'''
598598

599599

pdoc/test/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ def test_pdf_pandoc(self):
417417
run('pdoc', pdf=None)
418418
f.write(stdout.getvalue())
419419
subprocess.run(pdoc.cli._PANDOC_COMMAND, shell=True, check=True)
420-
self.assertTrue(os.path.exists('pdf.pdf'))
420+
self.assertTrue(os.path.exists('/tmp/pdoc.pdf'))
421421

422422
def test_config(self):
423423
with run_html(EXAMPLE_MODULE, config='link_prefix="/foobar/"'):

0 commit comments

Comments
 (0)