Skip to content

Update django.yml

Update django.yml #45

Workflow file for this run

name: Django CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13
env:
POSTGRES_USER: gdalface
POSTGRES_PASSWORD: gdalface
POSTGRES_DB: gdalface
ports:
- 5432:5432
options: >
--health-cmd="pg_isready -U postgres"
--health-interval=10s
--health-timeout=5s
steps:
- uses: actions/checkout@v4
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests
run: |
python manage.py test
timeout-minutes: 30 # Adjust as needed