Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include unit test. #10

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 26 additions & 10 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,42 @@ jobs:
with:
version: latest

- name: Delete samples
- name: Delete samples and test
run: |
rm -rf ./examples/*.pdf
rm -rf ./test/*.pdf

- name: List Files
id: file-list
- name: List Files examples
id: file-list-examples
shell: bash
run: |
list=$(ls -1 ./examples/*.typ);
file_list=$(echo "$list" | sed ':a;N;$!ba;s/\n/ /g')
echo "File List: $file_list"
echo "file_list=$file_list" >> $GITHUB_OUTPUT
listexamples=$(ls -1 ./examples/*.typ);
file_list_examples=$(echo "$listexamples" | sed ':a;N;$!ba;s/\n/ /g')
echo "File List Examples: $file_list_examples"
echo "file_list_examples=$file_list_examples" >> $GITHUB_OUTPUT

- name: Compile Typst to PDF
- name: Compile Typst examples to PDF
uses: mkpoli/compile-typst-action@main
with:
source_paths: ${{ steps.file-list.outputs.file_list }}
source_paths: ${{ steps.file-list.outputs.file_list_examples }}
root_path: '.'

- name: Delete samples
- name: List Files test
id: file-list-test
shell: bash
run: |
listtest=$(ls -1 ./test/*.typ);
file_list_test=$(echo "$listtest" | sed ':a;N;$!ba;s/\n/ /g')
echo "File List Test: $file_list_test"
echo "file_list_test=$file_list_test" >> $GITHUB_OUTPUT

- name: Compile Typst test to PDF
uses: mkpoli/compile-typst-action@main
with:
source_paths: ${{ steps.file-list.outputs.file_list_test }}
root_path: '.'

- name: Delete Doc
run: |
rm -rf ./doc/*.pdf

Expand Down
Binary file added test/test-1.pdf
Binary file not shown.
13 changes: 13 additions & 0 deletions test/test-1.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#import "../src/lib.typ": *

#show: g-exam.with(
school: (
name: []
)
)

#g-question(point: 2)[Question 1]

#g-question(point: 1)[Question 2]

#g-question(point: 1.5)[Question 3]
Loading