-
Notifications
You must be signed in to change notification settings - Fork 3
83 lines (71 loc) · 2 KB
/
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Run tests and check assets
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
needs: [test-matrix]
if: always()
steps:
- name: Tests successful
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Tests failing
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
test-matrix:
name: Tests ${{ matrix.typst-version.typst }}
runs-on: ubuntu-latest
strategy:
matrix:
typst-version:
- typst: 0.12
tytanic: 0.1
- typst: 0.13.0-rc1
tytanic: 0.2.0-rc1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install tytanic (binary)
if: ${{ !contains(matrix.typst-version.tytanic, '-rc') }}
uses: taiki-e/install-action@v2
with:
tool: tytanic@${{ matrix.typst-version.tytanic }}
- name: Install tytanic (source)
uses: taiki-e/cache-cargo-install-action@v2
if: ${{ contains(matrix.typst-version.tytanic, '-rc') }}
with:
tool: tytanic@${{ matrix.typst-version.tytanic }}
- name: Run test suite
id: run-suite
run: tt run --no-fail-fast --max-delta 1
- name: Archive artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: test-artifacts-${{ matrix.typst-version.tytanic }}
path: |
tests/**/diff/*.png
tests/**/out/*.png
tests/**/ref/*.png
retention-days: 5
assets:
name: Check assets and documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install just
uses: taiki-e/install-action@v2
with:
tool: just
- name: Install typst
uses: typst-community/setup-typst@v3
with:
typst-version: 0.12
- name: Check assets
run: just generate