Skip to content

Commit 0ef2c9c

Browse files
staredclaude
andcommitted
Add GitHub Actions workflow for Typst export tests
Creates a GHA workflow that: 1. Generates Typst file from equation content 2. Installs Typst using typst-community/setup-typst action 3. Compiles .typ file to PDF 4. Uploads both .typ and .pdf as artifacts Unlike the LaTeX workflow, this one properly fails on first error (no || true or continue-on-error flags) so any generation or compilation failures will stop the workflow immediately with a clear error message. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 582981b commit 0ef2c9c

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/test-typst.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Test Typst Export
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
test-typst:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Install pnpm
16+
uses: pnpm/action-setup@v4
17+
with:
18+
version: 10.19.0
19+
20+
- name: Setup Node
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 22
24+
cache: 'pnpm'
25+
26+
- name: Install dependencies
27+
run: pnpm install
28+
29+
- name: Generate Typst file
30+
run: pnpm tsx test-typst-export.ts
31+
32+
- name: Verify generated file exists
33+
run: |
34+
ls -lh /tmp/test-euler.typ
35+
echo "Typst file generated successfully"
36+
37+
- name: Install Typst
38+
uses: typst-community/setup-typst@v3
39+
with:
40+
typst-version: latest
41+
42+
- name: Compile Euler Typst to PDF
43+
run: typst compile /tmp/test-euler.typ /tmp/test-euler.pdf
44+
45+
- name: Verify PDF was created
46+
run: |
47+
ls -lh /tmp/test-euler.pdf
48+
echo "PDF created successfully"
49+
50+
- name: Upload Typst artifacts
51+
uses: actions/upload-artifact@v4
52+
if: always()
53+
with:
54+
name: typst-outputs
55+
path: |
56+
/tmp/test-euler.typ
57+
/tmp/test-euler.pdf
58+
if-no-files-found: warn
59+
retention-days: 30

0 commit comments

Comments
 (0)