Skip to content

Patch 1

Patch 1 #419

Workflow file for this run

name: Runs Tests
on:
- pull_request
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Wait for PostgreSQL
run: |
until pg_isready -h localhost -p 5432; do
echo "Waiting for PostgreSQL to be ready..."
sleep 5
done
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
playwright install
- run: pytest .
env:
DJANGO_SETTINGS_MODULE: apps.openunited.settings.development
DJANGO_SECRET_KEY: 123456789
# - name: Lint with Black (Check)
# # We are installing Black with requirements.txt
# run: black --check .