Skip to content

Commit eb1ad6a

Browse files
authored
Create test.yml
1 parent 19c136f commit eb1ad6a

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/test.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
compile:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: yusancky/setup-typst@v2
10+
with:
11+
version: latest
12+
- uses: actions/checkout@v3
13+
- name: Extract version
14+
id: toml
15+
run: |
16+
VERSION=$(awk -F'= *' '/^version/{gsub(/"/,"",$2);print $2}' typst.toml)
17+
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
18+
- name: Link local template package
19+
run: |
20+
mkdir -p ~/.local/share/typst/packages/preview/accelerated-jacow
21+
ln -s $(pwd) ~/.local/share/typst/packages/preview/accelerated-jacow/$VERSION
22+
- name: Init & compile
23+
run: |
24+
mkdir test
25+
cd test
26+
typst init @preview/accelerated-jacow:$VERSION
27+
typst compile *.typ
28+
- uses: actions/upload-artifact@v3
29+
with:
30+
name: PDF
31+
path: '*.pdf'

0 commit comments

Comments
 (0)