-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (65 loc) · 2.25 KB
/
check.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
# Based on https://github.com/CTeX-org/ctex-kit/blob/master/.github/workflows/test.yml
name: Test suite
on:
pull_request:
types:
# added "ready_for_review"
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
[opened, ready_for_review, reopened, synchronize]
push:
schedule:
# at 12:21 UTC (20:21 CST/UTC +8) on every Friday
- cron: "21 12 * * 5"
workflow_dispatch:
jobs:
tests:
strategy:
matrix:
config: ["build", "config-old"]
# TODO: find a way to handle different testfiles when checking
# with latex and latex-dev
# option: ["", "--dev"]
option: [""]
name: "Tests: ${{ matrix.config }}${{ matrix.option != '' && ' (latex-dev)' || '' }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup TeX Live
uses: teatimeguest/setup-texlive-action@v3
with:
package-file: .github/tl_packages
update-all-packages: true
# imagemagick is pre-installed on Ubuntu 22.04 image
# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#installed-apt-packages
- name: Install ppmcheckpdf dependencies
if: matrix.config == 'config-old'
run: |
sudo apt-get install imagemagick poppler-utils
- name: Run zutil tests
if: matrix.config == 'build'
run: |
cd zutil
l3build check \
--halt-on-error --show-saves \
${{ matrix.option }}
- name: Run tabularray tests
run: |
cd tabularray
l3build check \
-c${{ matrix.config }} --halt-on-error --show-saves \
${{ matrix.option }}
- name: Check tabularray tests with ppmcheckpdf
if: matrix.config == 'config-old'
run: |
cd tabularray
texlua buildend.lua
# TODO: generate a list of files related to failed tests, then
# upload all them (.tex, .log, .pdf, .png, .md5, etc.)
- name: Upload diff files
if: failure()
uses: actions/upload-artifact@v4
with:
name: tblr-diffs${{ matrix.config == 'config-old' && 'config-old' || '' }}${{ matrix.option != '' && '-dev' || '' }}
path: |
build/**/*.diff
build/**/*.diff.png