-
-
Notifications
You must be signed in to change notification settings - Fork 13
61 lines (51 loc) · 2.19 KB
/
tests-compile-ci.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
# =================================================================================================
# This does not perform complete checks of the test output, only tests if tablex-test.typ compiles.
# =================================================================================================
name: Tests Compile CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the branches below
push:
branches: [ "main", "0.1.0-dev" ]
pull_request:
branches: [ "main", "0.1.0-dev" ]
# Allows one to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
# Test for the following Typst versions
# 0.2.0 (earliest supported), 0.6.0 (first version with package management),
# 0.10.0 (latest supported)
typst-version: [v0.2.0, v0.6.0, v0.10.0]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: ⚠️ CI Disclaimer
run: |
cat <<DISCLAIMER
WARNING: This CI only tests if tablex-test.typ compiles. It does not test
if the generated PDF output differed from the reference tablex-test.pdf.
For now, you will have to manually compare the compiled PDF and the PDF
in the repository before committing. This will be dealt with in the future.
Thanks for understanding.
DISCLAIMER
- name: 📥 Setup Typst 0.2.0
uses: yusancky/setup-typst@v1
id: setup-typst-old
if: ${{ matrix.typst-version == 'v0.2.0' }}
with:
version: ${{ matrix.typst-version }}
- name: 📥 Setup Typst (0.3.0+)
uses: yusancky/setup-typst@v2
id: setup-typst
if: ${{ matrix.typst-version != 'v0.2.0' }}
with:
version: ${{ matrix.typst-version }}
- name: 🛠️ Compile test document
run: "typst compile tablex-test.typ"