Skip to content

Commit

Permalink
Add working test examples, and github workflow to run test and build
Browse files Browse the repository at this point in the history
I want to move these to another directory, but starting here
  • Loading branch information
scosman committed Aug 18, 2024
1 parent 5ce1f38 commit 1bab31d
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build Desktop Apps

on:
push:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
cache: "pip"

- run: pip install -r requirements.txt

- name: Build Core
run: hatch build
working-directory: ./core

- name: Test Core
run: hatch test
working-directory: ./core

- name: Build Studio
run: hatch build
working-directory: ./studio

- name: Test Studio
run: hatch test
working-directory: ./studio
10 changes: 10 additions & 0 deletions core/tests/test_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import unittest


class TestExample(unittest.TestCase):
def test_a(self):
self.assertEqual(42, 42)


if __name__ == "__main__":
unittest.main()
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ tomli==2.0.1
tomlkit==0.13.0
watchfiles==0.22.0
websockets==12.0
hatch==1.12.0
10 changes: 10 additions & 0 deletions studio/tests/test_studio_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import unittest


class TestExample(unittest.TestCase):
def test_a(self):
self.assertEqual(42, 42)


if __name__ == "__main__":
unittest.main()

0 comments on commit 1bab31d

Please sign in to comment.