Skip to content

Commit 21cb88a

Browse files
authored
Merge pull request typst-community#9 from SillyFreak/action-improvements
Improve CI workflow with Typst version matrix
2 parents 85a71fc + 53cd02a commit 21cb88a

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

.github/workflows/tests.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,51 @@ on:
77

88
jobs:
99
tests:
10+
strategy:
11+
matrix:
12+
# add any other Typst versions that your package should support
13+
typst-version: ["0.11"]
14+
# the docs don't need to build with all versions supported by the package;
15+
# the latest one is enough
16+
include:
17+
- typst-version: "0.11"
18+
doc: 1
1019
runs-on: ubuntu-latest
1120
steps:
1221
- name: Checkout
13-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
1423

1524
- name: Probe runner package cache
16-
uses: awalsh128/cache-apt-pkgs-action@latest
25+
uses: awalsh128/cache-apt-pkgs-action@v1
1726
with:
1827
packages: imagemagick cargo
1928
version: 1.0
2029

2130
- name: Install oxipng from crates.io
22-
uses: baptiste0928/cargo-install@v2.2.0
31+
uses: baptiste0928/cargo-install@v3
2332
with:
2433
crate: oxipng
2534

2635
- name: Install just from crates.io
27-
uses: baptiste0928/cargo-install@v2.2.0
36+
uses: baptiste0928/cargo-install@v3
2837
with:
2938
crate: just
3039

3140
- name: Install typst-test from github
32-
uses: baptiste0928/cargo-install@v2.2.0
41+
uses: baptiste0928/cargo-install@v3
3342
with:
3443
crate: typst-test
3544
git: https://github.com/tingerrr/typst-test.git
3645
tag: ci-semi-stable
3746

3847
- name: Setup typst
39-
uses: yusancky/setup-typst@v2
48+
uses: typst-community/setup-typst@v3
4049
with:
41-
version: 'v0.11.0'
50+
typst-version: ${{ matrix.typst-version }}
4251

4352
- name: Run test suite
44-
run: just ci
53+
run: just test
54+
55+
- name: Build docs
56+
if: ${{ matrix.doc }}
57+
run: just doc

0 commit comments

Comments
 (0)