mirror of
https://github.com/NovaOSS/nova-api.git
synced 2024-11-25 23:43:57 +01:00
Merge branch 'NovaOSS:main' into main
This commit is contained in:
commit
1a2ab86bad
4
.github/workflows/tests.yml
vendored
4
.github/workflows/tests.yml
vendored
|
@ -24,9 +24,7 @@ jobs:
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
pip install uvicorn
|
pip install uvicorn
|
||||||
|
|
||||||
- name: Start API server
|
- name: Start API server & run tests!
|
||||||
run: |
|
run: |
|
||||||
python run
|
python run
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: python tests
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ Runs for production on the speicified port.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import time
|
||||||
|
|
||||||
port = sys.argv[1] if len(sys.argv) > 1 else 2332
|
port = sys.argv[1] if len(sys.argv) > 1 else 2332
|
||||||
dev = True
|
dev = True
|
||||||
|
@ -23,3 +24,10 @@ if 'prod' in sys.argv:
|
||||||
dev = False
|
dev = False
|
||||||
|
|
||||||
os.system(f'cd api && uvicorn main:app{" --reload" if dev else ""} --host 0.0.0.0 --port {port}')
|
os.system(f'cd api && uvicorn main:app{" --reload" if dev else ""} --host 0.0.0.0 --port {port}')
|
||||||
|
|
||||||
|
time.sleep(2)
|
||||||
|
|
||||||
|
os.system('python tests')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue