Files
AdventureLog/.github/workflows/backend-test.yml
Sean Morley 7f6bf1390a Add Docker and environment configuration files for AdventureLog
- Introduced .dockerignore to exclude unnecessary files from Docker context.
- Added .env.aio.example for minimal configuration of the AdventureLog All-in-One setup.
- Updated .env.example to include optional SITE_URL and GUNICORN_WORKERS settings.
- Enhanced deploy.sh script for improved deployment flexibility and backup options.
- Updated docker-compose files to use PostGIS 16-3.5 and added health checks for services.
- Created docker-compose.aio.yml for All-in-One deployment configuration.
- Improved health checks and service dependencies in docker-compose.dev.yml and docker-compose.yml.
- Added GitHub workflows for building and pushing Docker images, including smoke tests for AIO setup.
2026-06-06 18:54:25 -04:00

59 lines
1.5 KiB
YAML

name: Test Backend
permissions:
contents: read
on:
pull_request:
push:
jobs:
build:
name: Build and Test Backend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: install dependencies
run: |
sudo apt update -q
sudo apt install -y -q python3-gdal
- name: start database
run: |
docker compose -f .github/.docker-compose-database.yml up -d
- name: install python libraries
working-directory: backend/server
run: pip install -r requirements.txt
- name: run server
working-directory: backend/server
env:
PGHOST: "127.0.0.1"
PGDATABASE: "database"
PGUSER: "adventure"
PGPASSWORD: "changeme123"
SECRET_KEY: "changeme123"
DJANGO_ADMIN_USERNAME: "admin"
DJANGO_ADMIN_PASSWORD: "admin"
DJANGO_ADMIN_EMAIL: "admin@example.com"
PUBLIC_URL: "http://localhost:8000"
CSRF_TRUSTED_ORIGINS: "http://localhost:5173,http://localhost:8000"
DEBUG: "True"
FRONTEND_URL: "http://localhost:5173"
run: |
python manage.py migrate
python manage.py runserver &
- name: wait for backend to boot
run: >
curl -fisS --retry 60 --retry-delay 1 --retry-all-errors
http://localhost:8000/