Skip to content

Commit

Permalink
add ci and return exit codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Marmare314 committed Sep 27, 2023
1 parent 0f83db8 commit 3064414
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Continuous integration
on: [push, pull_request]

jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: yusancky/setup-typst@v2
id: setup-typst
with:
version: 'latest'
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: python tests/tools/run_tests.py
2 changes: 2 additions & 0 deletions tests/tools/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,7 @@ def main():
os.remove(output_file(name))
os.rmdir(output_directory())

exit(not success)

if __name__ == "__main__":
main()
3 changes: 3 additions & 0 deletions tests/tools/update_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ def main():
print("All references updated successfully ✓")
else:
print("Some reference updates failed ✗")

exit(not success)
else:
print("No tests provided. Use either '--all' or provide a list of test names.")
exit(1)


if __name__ == "__main__":
Expand Down

0 comments on commit 3064414

Please sign in to comment.