-
Notifications
You must be signed in to change notification settings - Fork 8
122 lines (97 loc) · 3.28 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
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