From 01a0f0af8631638bc923b92efce73dbb4234a712 Mon Sep 17 00:00:00 2001 From: Joao Antunes Date: Thu, 30 Nov 2023 04:33:01 -0700 Subject: [PATCH] Added unit tests for CI/CD --- .github/workflows/unit_tests.yml | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/unit_tests.yml diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml new file mode 100644 index 00000000..1ec49eb7 --- /dev/null +++ b/.github/workflows/unit_tests.yml @@ -0,0 +1,36 @@ +name: CI-UnitTests + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + # services: + # postgres: + # image: postgres:9.6 + # env: + # POSTGRES_DB: default + # POSTGRES_USER: postgres + # ports: + # - 5432:5432 + # options: >- + # --health-cmd pg_isready + # --health-interval 10s + # --health-timeout 5s + # --health-retries 5 + + steps: + - name: Check out source repository + uses: actions/checkout@v3 + + - name: Set up Python environment + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install dependencies + run: | + pip install --upgrade pip wheel setuptools + pip install django==3.2 + pip install dj-database-url + - name: Run tests + run: python -m runtests \ No newline at end of file