Skip to content

Commit 97018bf

Browse files
authored
update testing to tytanic (typst-community#26)
1 parent b183127 commit 97018bf

File tree

9 files changed

+28
-22
lines changed

9 files changed

+28
-22
lines changed

.github/workflows/tests.yml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ jobs:
1010
strategy:
1111
matrix:
1212
# add any other Typst versions that your package should support
13-
typst-version: ["0.12"]
13+
typst-version:
14+
- typst: 0.12
15+
tytanic: 0.1
1416
# the docs don't need to build with all versions supported by the package;
1517
# the latest one is enough
1618
include:
17-
- typst-version: "0.12"
19+
- typst-version: {typst: 0.12, tytanic: 0.1}
1820
doc: 1
1921
runs-on: ubuntu-latest
2022
steps:
@@ -24,40 +26,34 @@ jobs:
2426
- name: Probe runner package cache
2527
uses: awalsh128/cache-apt-pkgs-action@v1
2628
with:
27-
packages: imagemagick cargo
29+
packages: cargo
2830
version: 1.0
2931

30-
- name: Install oxipng from crates.io
31-
uses: baptiste0928/cargo-install@v3
32-
with:
33-
crate: oxipng
34-
3532
- name: Install just from crates.io
3633
uses: baptiste0928/cargo-install@v3
3734
with:
3835
crate: just
3936

40-
- name: Install typst-test from github
37+
- name: Install tytanic from crates.io
4138
uses: baptiste0928/cargo-install@v3
4239
with:
43-
crate: typst-test
44-
git: https://github.com/tingerrr/typst-test.git
45-
tag: ci-semi-stable
40+
crate: tytanic
41+
version: ${{ matrix.typst-version.tytanic }}
4642

4743
- name: Setup typst
4844
id: setup-typst
4945
uses: typst-community/setup-typst@v3
5046
with:
51-
typst-version: ${{ matrix.typst-version }}
47+
typst-version: ${{ matrix.typst-version.typst }}
5248

5349
- name: Run test suite
5450
run: just test
5551

56-
- name: Archive diffs
52+
- name: Archive test results
5753
uses: actions/upload-artifact@v4
5854
if: always()
5955
with:
60-
name: typst-${{ steps.setup-typst.outputs.typst-version }}-diffs
56+
name: typst-${{ steps.setup-typst.outputs.typst-version }}-test-results
6157
path: |
6258
tests/**/diff/*.png
6359
tests/**/out/*.png

Justfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ doc:
1414

1515
# run test suite
1616
test *args:
17-
typst-test run {{ args }}
17+
tt run {{ args }}
1818

1919
# update test cases
2020
update *args:
21-
typst-test update {{ args }}
21+
tt update {{ args }}
2222

2323
# package the library into the specified destination folder
2424
package target:

tests/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/.ignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

tests/test1/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# generated by tytanic, do not edit
2+
3+
diff/**
4+
out/**

tests/test1/ref/1.png

46.6 KB
Loading

tests/test1/test.typ

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
#import "/src/lib.typ" as my-package
2+
13
Hello World

tests/unit1/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# generated by tytanic, do not edit
2+
3+
diff/**
4+
out/**
5+
ref/**

tests/unit1/test.typ

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#import "/src/lib.typ" as my-package
2+
3+
// TODO real tests
4+
#assert(true)

0 commit comments

Comments
 (0)