Skip to content

Commit 920dbb1

Browse files
committed
CI: Cache APT and pandoc download
1 parent b103ad4 commit 920dbb1

File tree

2 files changed

+25
-8
lines changed

2 files changed

+25
-8
lines changed

.github/actions/setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ runs:
1212
uses: actions/setup-python@v5
1313
with:
1414
python-version: ${{ inputs.python-version }}
15-
- uses: actions/cache@v4
15+
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2
1616
with:
1717
path: |
1818
~/.cache/pip

.github/workflows/ci.yml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,29 @@ jobs:
2929

3030
- run: pip install -U pip setuptools wheel && pip install -U .
3131

32-
- name: Install lint dependencies
33-
run: |
34-
pip install flake8 coverage mypy types-Markdown
35-
sudo apt update && sudo apt-get install \
36-
texlive-xetex lmodern texlive-fonts-recommended # test_pdf_pandoc
37-
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
32+
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2
33+
with:
34+
path: /tmp/pandoc.deb
35+
key: pandoc
36+
37+
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2
38+
with:
39+
path: |
40+
/usr/bin/xelatex*
41+
/usr/share/texlive/
42+
/usr/share/doc/texlive*
43+
/usr/share/texmf/
44+
/var/lib/tex*
45+
/usr/share/fonts/X11/Type1/lm*
46+
/etc/X11/fonts/Type1/lmodern.scale
47+
key: latex-${{ runner.os }}
48+
49+
- run: pip install flake8 coverage mypy types-Markdown
50+
51+
# test_pdf_pandoc
52+
- run: command -f xelatex || sudo apt-get update && sudo apt-get install texlive-xetex lmodern texlive-fonts-recommended
53+
- run: wget --no-clobber -O/tmp/pandoc.deb https://github.com/jgm/pandoc/releases/download/3.1.12.2/pandoc-3.1.12.2-1-amd64.deb || true
54+
- run: sudo dpkg -i /tmp/pandoc.deb
3855

3956
- run: find -name '*.md' | xargs .github/lint-markdown.sh
4057
- run: flake8 pdoc setup.py
@@ -59,4 +76,4 @@ jobs:
5976
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
6077

6178
- run: pip install -U pip setuptools wheel && pip install -e .
62-
- run: time doc/build.sh
79+
- run: time doc/build.sh

0 commit comments

Comments
 (0)