From c263cc1626e9a68a9d311767b56792a36e395b10 Mon Sep 17 00:00:00 2001 From: Game_Time <108236317+RayBytes@users.noreply.github.com> Date: Sun, 20 Aug 2023 15:29:13 +0500 Subject: [PATCH 1/2] please work --- run/__main__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/run/__main__.py b/run/__main__.py index ced6c7d..67b1c0a 100644 --- a/run/__main__.py +++ b/run/__main__.py @@ -14,6 +14,7 @@ Runs for production on the speicified port. import os import sys +import time port = sys.argv[1] if len(sys.argv) > 1 else 2332 dev = True @@ -23,3 +24,10 @@ if 'prod' in sys.argv: dev = False 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') + + + From 63c717652a305a16cd41fc399c697cd1688f5155 Mon Sep 17 00:00:00 2001 From: Game_Time <108236317+RayBytes@users.noreply.github.com> Date: Sun, 20 Aug 2023 15:29:32 +0500 Subject: [PATCH 2/2] please work v2 --- .github/workflows/tests.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f779b59..5557179 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,9 +24,7 @@ jobs: pip install -r requirements.txt pip install uvicorn - - name: Start API server + - name: Start API server & run tests! run: | python run - - - name: Run tests - run: python tests +