-
Notifications
You must be signed in to change notification settings - Fork 8
143 lines (114 loc) · 3.81 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
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-latex:
if: ${{ !contains(github.event.head_commit.message, 'ci skip') }}
name: LaTeX test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config: ['luatex-1', 'luatex-2', 'pdftex-1', 'pdftex-2', 'doc']
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up TeX Live
uses: zauguin/install-texlive@v3
with:
package_file: .github/tl_packages
# - name: Set up TeX Live
# uses: teatimeguest/setup-texlive-action@v2
# with:
# package-file: .github/tl_packages
# update-all-packages: true
- name: Run example
if: ${{ matrix.config == 'doc' }}
run: |
l3build install
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
- name: Test LaTeX doc
if: ${{ matrix.config == 'doc' }}
run: l3build doc
- name: Test LaTeX package
if: ${{ matrix.config != 'doc' }}
run: l3build check --config tests/latex/config-${{ matrix.config }}
- name: Upload diffs of failed tests
if: ${{ matrix.config != 'doc' && failure() }}
uses: actions/upload-artifact@v4
with:
name: testfiles-${{ matrix.config }}
path: build/**/*.diff
retention-days: 3
test-texlua:
if: ${{ !contains(github.event.head_commit.message, 'ci skip') }}
name: Lua test (texlua)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up TeX Live
uses: zauguin/install-texlive@v3
with:
package_file: .github/tl_packages
# - name: Set up TeX Live
# uses: teatimeguest/setup-texlive-action@v2
# with:
# package-file: .github/tl_packages
# update-all-packages: true
- 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
- name: Test other Lua modules
run: busted --output=TAP
test-lua:
if: ${{ !contains(github.event.head_commit.message, 'ci skip') }}
name: Lua Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
luaVersion: ["5.3", "5.4"]
steps:
- name: Checkout
uses: actions/checkout@v4
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