From 3eca24203d3e610a7f79c4749446b3b9ce739dc8 Mon Sep 17 00:00:00 2001 From: Andrew Liu Date: Sun, 14 Apr 2024 14:11:29 +0000 Subject: [PATCH] add pyright, pytest to ci-cd --- .github/workflows/ci-cd.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 61bd1ca8a..8a7d53200 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -9,6 +9,42 @@ on: - main jobs: +tests: + name: Run tests + + runs-on: ubuntu-20.04 + + services: + postgres: + image: postgres:16 + env: + POSTGRES_PASSWORD: password + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 5432:5432 + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.12 + cache: "pip" + + - name: Install dependencies + run: pip install -r requirements.txt + + - name: Run Pyright + uses: jakebailey/pyright-action@v1 + + - name: Run pytests + run: pytest -v -s + pre-commit: name: run pre-commit