From 7d965ec42c12ba2a06f3a7b1ebf68900713a4312 Mon Sep 17 00:00:00 2001 From: Carson-Shaar Date: Fri, 15 Sep 2023 14:20:39 -0400 Subject: [PATCH] Create GHA to run tests --- .github/workflows/run_tests.yml | 29 +++++++++++++++++++ .../test_code_cell_parser.py | 0 2 files changed, 29 insertions(+) create mode 100644 .github/workflows/run_tests.yml rename zt_backend/{runner => tests}/test_code_cell_parser.py (100%) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml new file mode 100644 index 00000000..e3000b65 --- /dev/null +++ b/.github/workflows/run_tests.yml @@ -0,0 +1,29 @@ +name: Run Backend Tests + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs_on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.9 + + - name: Install dependencies and run tests + run: | + cd zt_backend + python -m pip install --upgrade pip + pip install -r requirements.txt + pytest tests/ \ No newline at end of file diff --git a/zt_backend/runner/test_code_cell_parser.py b/zt_backend/tests/test_code_cell_parser.py similarity index 100% rename from zt_backend/runner/test_code_cell_parser.py rename to zt_backend/tests/test_code_cell_parser.py