Skip to content

Commit

Permalink
CI: Bump tested pandoc integration from v2 to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
kernc committed Mar 11, 2024
1 parent b3ab987 commit e7a446a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
pip install flake8 coverage mypy types-Markdown
sudo apt update && sudo apt-get install \
texlive-xetex lmodern texlive-fonts-recommended # test_pdf_pandoc
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
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
- run: find -name '*.md' | xargs .github/lint-markdown.sh
- run: flake8 pdoc setup.py
Expand All @@ -40,6 +40,10 @@ jobs:
- run: bash <(curl -s https://codecov.io/bash)
- run: coverage report
- run: PDOC_TEST_PANDOC=1 time python -m unittest -v pdoc.test.CliTest.test_pdf_pandoc
- uses: actions/upload-artifact@v3
with:
name: Pdoc Documentation.pdf
path: /tmp/pdoc.pdf

docs:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion pdoc/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ def docfilter(obj, _filters=args.filter.strip().split(',')):
pandoc --metadata=title:"MyProject Documentation" \\
--from=markdown+abbreviations+tex_math_single_backslash \\
--pdf-engine=xelatex --variable=mainfont:"DejaVu Sans" \\
--toc --toc-depth=4 --output=pdf.pdf pdf.md\
--toc --toc-depth=4 --output=/tmp/pdoc.pdf pdf.md
'''


Expand Down
2 changes: 1 addition & 1 deletion pdoc/test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ def test_pdf_pandoc(self):
run('pdoc', pdf=None)
f.write(stdout.getvalue())
subprocess.run(pdoc.cli._PANDOC_COMMAND, shell=True, check=True)
self.assertTrue(os.path.exists('pdf.pdf'))
self.assertTrue(os.path.exists('/tmp/pdoc.pdf'))

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

0 comments on commit e7a446a

Please sign in to comment.