Skip to content

create initial CI

create initial CI #2

# =================================================================================================
# This does not perform complete checks of the test output, only tests if tablex-test.typ compiles.
# =================================================================================================
name: Tests Compile CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the branches below
push:
branches: [ "main", "0.1.0-dev" ]
pull_request:
branches: [ "main", "0.1.0-dev" ]
# Allows one to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
# Test for the following Typst versions
# 0.2.0 (earliest supported), 0.6.0 (first version with package management),
# 0.10.0 (latest supported)
typst-version: [v0.2.0, v0.6.0, v0.10.0]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: ⚠️ CI Disclaimer
run: |
cat <<DISCLAIMER
WARNING: This CI only tests if tablex-test.typ compiles. It does not test
if the generated PDF output differed from the reference tablex-test.pdf.
For now, you will have to manually compare the compiled PDF and the PDF
in the repository before committing. This will be dealt with in the future.
Thanks for understanding.
DISCLAIMER
- name: 📥 Setup Typst 0.2.0
uses: yusancky/setup-typst@v1
id: setup-typst-old
if: ${{ matrix.typst-version == "v0.2.0" }}

Check failure on line 49 in .github/workflows/tests-compile-ci.yml

View workflow run for this annotation

GitHub Actions / Tests Compile CI

Invalid workflow file

The workflow is not valid. .github/workflows/tests-compile-ci.yml (Line: 49, Col: 13): Unexpected symbol: '"v0'. Located at position 25 within expression: matrix.typst-version == "v0.2.0" .github/workflows/tests-compile-ci.yml (Line: 56, Col: 13): Unexpected symbol: '"v0'. Located at position 25 within expression: matrix.typst-version != "v0.2.0"
with:
version: ${{ matrix.typst-version }}
- name: 📥 Setup Typst (0.3.0+)
uses: yusancky/setup-typst@v2
id: setup-typst
if: ${{ matrix.typst-version != "v0.2.0" }}
with:
version: ${{ matrix.typst-version }}
- name: 🛠️ Compile test document
run: "typst compile tablex-test.typ"