2026-02-18 20:18:56 -05:00
|
|
|
services:
|
|
|
|
|
- name: postgres
|
|
|
|
|
image: postgres:16
|
|
|
|
|
environment:
|
|
|
|
|
POSTGRES_DB: python_tdd_test
|
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
|
POSTGRES_PASSWORD: postgres
|
|
|
|
|
|
2026-02-10 21:16:00 -05:00
|
|
|
steps:
|
2026-02-18 20:18:56 -05:00
|
|
|
- name: test-UTs-n-ITs
|
2026-02-10 21:16:00 -05:00
|
|
|
image: python:3.13-slim
|
2026-02-18 20:18:56 -05:00
|
|
|
environment:
|
|
|
|
|
DATABASE_URL: postgresql://postgres:postgres@postgres/python_tdd_test
|
2026-02-10 21:16:00 -05:00
|
|
|
commands:
|
2026-02-11 12:54:49 -05:00
|
|
|
- pip install -r requirements.txt
|
|
|
|
|
- cd ./src
|
|
|
|
|
- python manage.py test apps
|
2026-02-20 15:16:19 -05:00
|
|
|
when:
|
|
|
|
|
- event: push
|
2026-02-10 22:42:45 -05:00
|
|
|
|
2026-02-11 12:54:49 -05:00
|
|
|
- name: test-FTs
|
|
|
|
|
image: gitea.earthmanrpg.me/discoman/python-tdd-ci:latest
|
|
|
|
|
environment:
|
|
|
|
|
HEADLESS: 1
|
|
|
|
|
commands:
|
|
|
|
|
- cd ./src
|
2026-02-11 13:26:55 -05:00
|
|
|
- python manage.py collectstatic --noinput
|
2026-02-11 12:54:49 -05:00
|
|
|
- python manage.py test functional_tests
|
2026-02-20 15:16:19 -05:00
|
|
|
when:
|
|
|
|
|
- event: push
|
2026-02-11 15:12:04 -05:00
|
|
|
|
|
|
|
|
- name: screendumps
|
|
|
|
|
image: gitea.earthmanrpg.me/discoman/python-tdd-ci:latest
|
|
|
|
|
commands:
|
|
|
|
|
- cat ./src/functional_tests/screendumps/*.html || echo "No screendumps found"
|
2026-02-20 15:16:19 -05:00
|
|
|
when:
|
|
|
|
|
- event: push
|
|
|
|
|
status: failure
|
2026-02-13 15:27:59 -05:00
|
|
|
|
|
|
|
|
- name: build-and-push
|
|
|
|
|
image: docker:cli
|
|
|
|
|
environment:
|
|
|
|
|
REGISTRY_PASSWORD:
|
|
|
|
|
from_secret: gitea_registry_password
|
|
|
|
|
commands:
|
|
|
|
|
- echo "$REGISTRY_PASSWORD" | docker login gitea.earthmanrpg.me -u discoman --password-stdin
|
|
|
|
|
- docker build -t gitea.earthmanrpg.me/discoman/gamearray:latest .
|
|
|
|
|
- docker push gitea.earthmanrpg.me/discoman/gamearray:latest
|
|
|
|
|
when:
|
|
|
|
|
- branch: main
|
2026-02-20 15:16:19 -05:00
|
|
|
event: push
|
2026-02-13 15:27:59 -05:00
|
|
|
|
|
|
|
|
- name: deploy
|
|
|
|
|
image: alpine
|
|
|
|
|
environment:
|
|
|
|
|
SSH_KEY:
|
|
|
|
|
from_secret: deploy_ssh_key
|
|
|
|
|
commands:
|
|
|
|
|
- apk add --no-cache openssh-client
|
|
|
|
|
- mkdir -p ~/.ssh
|
|
|
|
|
- printf '%s\n' "$SSH_KEY" > ~/.ssh/id_ed25519
|
|
|
|
|
- chmod 600 ~/.ssh/id_ed25519
|
|
|
|
|
- ssh -o StrictHostKeyChecking=no discoman@staging.earthmanrpg.me /opt/gamearray/deploy.sh
|
|
|
|
|
when:
|
|
|
|
|
- branch: main
|
2026-02-20 15:16:19 -05:00
|
|
|
event: push
|
2026-02-10 22:42:45 -05:00
|
|
|
|