Prepare database-free BortStack deployment

This commit is contained in:
rob
2026-11-12 10:08:54 +00:00
parent 7ad054b0ca
commit 5c02d88843
14 changed files with 230 additions and 253 deletions
+3 -45
View File
@@ -16,55 +16,15 @@ jobs:
run:
working-directory: api
env:
APP_ENV: testing
SQLALCHEMY_DATABASE_URI: sqlite:///:memory:
SECRET_KEY: ci-test-key
REGISTRATION_MODE: open
EMAIL_DELIVERY_ENABLED: "false"
RATELIMIT_ENABLED: "false"
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- run: python -m pip install -r config/requirements-dev.txt
- run: pytest test_contact_independent.py
- run: pytest --cov --cov-report=term-missing
backend-mysql:
runs-on: ubuntu-latest
defaults:
run:
working-directory: api
services:
mysql:
image: mysql:8.4
env:
MYSQL_DATABASE: app_test
MYSQL_USER: app_test
MYSQL_PASSWORD: test-password
MYSQL_ROOT_PASSWORD: root-test-password
ports: ["3306:3306"]
options: >-
--health-cmd="mysqladmin ping -h localhost -uroot -proot-test-password --silent"
--health-interval=10s
--health-timeout=5s
--health-retries=10
env:
APP_ENV: testing
SQLALCHEMY_DATABASE_URI: mysql+pymysql://app_test:test-password@127.0.0.1:3306/app_test
SECRET_KEY: ci-test-key
REGISTRATION_MODE: open
EMAIL_DELIVERY_ENABLED: "false"
RATELIMIT_ENABLED: "false"
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- run: python -m pip install -r config/requirements-dev.txt
- run: flask --app api.py db upgrade
- run: pytest
- run: pytest --cov --cov-report=term-missing test_contact_independent.py
- run: python ../scripts/check-deployment-config.py
frontend:
runs-on: ubuntu-latest
@@ -87,7 +47,7 @@ jobs:
publish-images:
if: github.ref == 'refs/heads/production' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
needs: [backend, backend-mysql, frontend]
needs: [backend, frontend]
runs-on: ubuntu-latest
permissions:
contents: read
@@ -226,8 +186,6 @@ jobs:
compose=(docker compose --env-file "$env_path")
"${compose[@]}" config --quiet
"${compose[@]}" pull api nginx
"${compose[@]}" up -d mysql
"${compose[@]}" run --rm --no-deps api flask --app api.py db upgrade
"${compose[@]}" up -d --no-build api nginx
"${compose[@]}" ps