Skip to content

Commit

Permalink
create initial CI
Browse files Browse the repository at this point in the history
only checks if the tests compile for now
  • Loading branch information
PgBiel authored Dec 17, 2023
1 parent 5d21680 commit 297ef9c
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/tests-compile-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# =================================================================================================
# 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"
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"

0 comments on commit 297ef9c

Please sign in to comment.