Skip to content

Test with multiple versions of TeX Live #346

Test with multiple versions of TeX Live

Test with multiple versions of TeX Live #346

Workflow file for this run

name: Test
on:
push:
branches:
- "**"
pull_request:
schedule:
# Run every Monday and Friday at 00:42. The time has been chosen at random.
- cron: '42 0 * * 1,5'
workflow_dispatch:
jobs:
test-lua:
if: ${{ !contains(github.event.head_commit.message, 'ci skip') }}
name: Lua Test
runs-on: ubuntu-latest
strategy:
matrix:
luaVersion: ["5.3", "5.4"]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Lua ${{ matrix.luaVersion }}
uses: leafo/gh-actions-lua@v10
with:
luaVersion: ${{ matrix.luaVersion }}
- name: Set up LuaRocks
uses: leafo/gh-actions-luarocks@v4
- name: Install package
run: luarocks build
- name: Install busted
run: luarocks install busted
- name: Test citperoc-lua engine
run: busted --lua=lua --lpath="" --run=citeproc --output=TAP
- name: Test other Lua modules
run: busted --lua=lua --lpath="" --output=TAP
test-tex:
if: ${{ !contains(github.event.head_commit.message, 'ci skip') }}
name: LaTeX Test
runs-on: ubuntu-latest
strategy:
matrix:
version: [2017, 2018, 2019, 2020, 2021, 2022, 2023, "latest"]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up TeX Live (${{ matrix.version }})
uses: teatimeguest/setup-texlive-action@v2
with:
package-file: .github/tl_${{ matrix.version }}_packages
version: ${{ matrix.version }}
update-all-packages: ${{ matrix.version == 'latest' }}
- name: Set up Lua
uses: leafo/gh-actions-lua@v10
with:
luaVersion: "5.3"
- name: Set up LuaRocks
uses: leafo/gh-actions-luarocks@v4
- name: Install busted
run: luarocks install busted
- name: Test citperoc-lua engine
run: busted --run=citeproc --output=TAP
- run: l3build install
- name: Test other Lua modules
run: busted --output=TAP
- name: Test LaTeX documentation
if: ${{ matrix.version != 'latest' }}
run: l3build doc
- name: Test LaTeX package
if: ${{ matrix.version == 'latest' }}
run: l3build ctan
- name: Upload CTAN archive
if: ${{ matrix.version == 'latest' }}
uses: actions/upload-artifact@v3
with:
name: ctan-archive
path: "*-ctan.zip"
retention-days: 3
- name: Archive failed test output
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: testfiles
path: build/**/*.diff
retention-days: 3
- name: Run examples
run: |
cd examples
pdflatex -file-line-error -halt-on-error -interaction=nonstopmode example.tex
"$(kpsewhich -var-value=TEXMFHOME)"/scripts/citation-style-language/citeproc-lua.lua example.aux
pdflatex -file-line-error -halt-on-error -interaction=nonstopmode example.tex
rm example.aux example.bbl
lualatex -file-line-error -halt-on-error -interaction=nonstopmode example.tex
lualatex -file-line-error -halt-on-error -interaction=nonstopmode example.tex