Skip to content

Commit

Permalink
caching
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre-24 committed Apr 22, 2024
1 parent aeb3a20 commit 9b7400c
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Run tests

env:
TEMPLATEDIR: $HOME/.texlive/texmf-local/tex/latex/latex-template
TEMPLATEDIR: ${HOME}/.texlive/texmf-local/tex/latex/latex-template

on:
push:
Expand All @@ -23,17 +23,31 @@ jobs:
run: |
sudo apt-get install imagemagick librsvg2-bin
pip install Pygments
- name: Install LaTeX
- name: use cache of TeXLive
id: cache-install
uses: actions/cache@v3
with:
path: |
$HOME/.texlive
key: texlive
- name: Install TeXLive
if: steps.cache-install.outputs.cache-hit != 'true'
run: |
./scripts/install_font.sh
./scripts/install_texlive.sh
echo "PATH=$HOME/.texlive/bin/x86_64-linux:$PATH" >> $GITHUB_ENV
- name: Test Lua
run: |
export PATH=$HOME/.texlive/bin/x86_64-linux:$PATH
cd tests
make lua-test
- name: Test LaTeX
run: |
export PATH=$HOME/.texlive/bin/x86_64-linux:$PATH
mkdir -p ${TEMPLATEDIR} && cp -r . ${TEMPLATEDIR} && texhash
mkdir -p ${TEMPLATEDIR}
cp -r . ${TEMPLATEDIR}
texhash
make tests
- name: Remove template from TeXLive before caching
if: steps.cache-install.outputs.cache-hit != 'true'
run: |
rm ${TEMPLATEDIR}
texhash

0 comments on commit 9b7400c

Please sign in to comment.