-
-
Notifications
You must be signed in to change notification settings - Fork 53
84 lines (72 loc) · 2.05 KB
/
tests.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
name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
tests:
strategy:
matrix:
# add any other Typst versions that your package should support
typst-version: ["0.12"]
# the docs don't need to build with all versions supported by the package;
# the latest one is enough
include:
- typst-version: "0.12"
doc: 1
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Probe runner package cache
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: imagemagick cargo
version: 1.0
- name: Install oxipng from crates.io
uses: baptiste0928/cargo-install@v3
with:
crate: oxipng
- name: Install just from crates.io
uses: baptiste0928/cargo-install@v3
with:
crate: just
- name: Install typst-test from github
uses: baptiste0928/cargo-install@v3
with:
crate: typst-test
git: https://github.com/tingerrr/typst-test.git
tag: ci-semi-stable
- name: Setup typst
uses: typst-community/setup-typst@v3
with:
typst-version: ${{ matrix.typst-version }}
- name: Install fonts
run: |
sudo apt update
sudo apt-get install fonts-roboto
./scripts/install-fontawesome
./scripts/install-source-sans
- name: Install locally
run: just install
- name: Run test suite
run: just test
- name: Archive diffs
uses: actions/upload-artifact@v4
if: always()
with:
name: diffs
path: |
tests/**/diff/*.png
tests/**/out/*.png
tests/**/ref/*.png
retention-days: 5
- name: Build docs
if: ${{ matrix.doc }}
run: just doc
- name: Upload docs
uses: actions/upload-artifact@v4
with:
name: manual
path: docs/manual.pdf