Skip to content

Commit

Permalink
Merge pull request #9 from SillyFreak/action-improvements
Browse files Browse the repository at this point in the history
Improve CI workflow with Typst version matrix
  • Loading branch information
jamesrswift authored Jun 8, 2024
2 parents 85a71fc + 53cd02a commit 21cb88a
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,51 @@ on:

jobs:
tests:
strategy:
matrix:
# add any other Typst versions that your package should support
typst-version: ["0.11"]
# the docs don't need to build with all versions supported by the package;
# the latest one is enough
include:
- typst-version: "0.11"
doc: 1
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Probe runner package cache
uses: awalsh128/cache-apt-pkgs-action@latest
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: imagemagick cargo
version: 1.0

- name: Install oxipng from crates.io
uses: baptiste0928/cargo-install@v2.2.0
uses: baptiste0928/cargo-install@v3
with:
crate: oxipng

- name: Install just from crates.io
uses: baptiste0928/cargo-install@v2.2.0
uses: baptiste0928/cargo-install@v3
with:
crate: just

- name: Install typst-test from github
uses: baptiste0928/cargo-install@v2.2.0
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: yusancky/setup-typst@v2
uses: typst-community/setup-typst@v3
with:
version: 'v0.11.0'
typst-version: ${{ matrix.typst-version }}

- name: Run test suite
run: just ci
run: just test

- name: Build docs
if: ${{ matrix.doc }}
run: just doc

0 comments on commit 21cb88a

Please sign in to comment.