Skip to content

Tests CI

Tests CI #31

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
# Allows one to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: ๐Ÿ’พ Restore Homebrew Cache
uses: actions/cache@v4
with:
path: /home/linuxbrew/.linuxbrew
key: ${{ runner.os }}-brew-${{ hashFiles('Brewfile') }}
restore-keys: |
${{ runner.os }}-brew-
- name: ๐Ÿบ Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: ๐Ÿบ Install typstyle
run: "brew install typstyle"
- name: ๐Ÿงน Check style
run: "find . -name '*.typ' | xargs typstyle --check -c 120"
test_build:
runs-on: ubuntu-latest
strategy:
matrix:
# Test for the following Typst versions
# 0.6.0 (first version with package management),
# 0.11.0 (latest supported)
typst-version: [v0.11.0, latest]
steps:
- uses: actions/checkout@v4
- name: โš™๏ธ Setup Typst
uses: typst-community/setup-typst@v3
id: setup-typst
with:
typst-version: ${{ matrix.typst-version }}
cache-dependency-path: requirements.typ
- name: ๐Ÿ—๏ธ Build Demo Doc
run: "typst compile --root . --font-path ./font examples/demo.typ"
- name: ๐Ÿ—๏ธ Build Manual
run: "typst compile --root . --font-path ./font manual/manual.typ"
just_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: ๐Ÿ’พ Restore Homebrew Cache
id: cache-homebrew-restore
uses: actions/cache/restore@v4
with:
path: /home/linuxbrew/.linuxbrew
key: ${{ runner.os }}-brew-${{ hashFiles('Brewfile') }}
- name: ๐Ÿบ Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: ๐Ÿบ Install Python
run: "brew install python"
- name: ๐Ÿบ Install imagemagick
run: "brew install imagemagick"
- name: ๐Ÿบ Install Just
run: "brew install just"
- name: ๐Ÿบ Install Whiskers
run: "brew install catppuccin/tap/whiskers"
- name: ๐Ÿบ Install Typst
run: "brew install typst"
- name: ๐Ÿบ Install typstyle
run: "brew install typstyle"
- name: ๐Ÿ—๏ธ Run Just build
run: "just build"