Skip to content
Snippets Groups Projects
Commit ef627d51 authored by nd's avatar nd Committed by nd
Browse files

add package testing

parent efa3cb27
No related branches found
No related tags found
No related merge requests found
......@@ -116,6 +116,14 @@ test:package:apt:
stage: test
script:
- apt -y install ./build/*.deb
- apt -y install curl
- ln -s /etc/uffd/uwsgi.ini /etc/uwsgi/apps-available/uffd.ini
- ln -s /etc/uwsgi/apps-available/uffd.ini /etc/uwsgi/apps-enabled/uffd.ini
- service uwsgi start uffd || ( service uwsgi status uffd ; sleep 15; cat /var/log/uwsgi/app/uffd.log; )
- echo "server { listen 127.0.0.1:5000 default_server; include /etc/uffd/nginx.include.conf; }" > /etc/nginx/sites-enabled/uffd.ini
- service nginx start || ( service nginx status; nginx -t; exit 1; )
- sleep 5
- curl -Lv 127.0.0.1:5000
dependencies:
- build:apt
......
FLASK_ENV=production
SQLALCHEMY_DATABASE_URI=sqlite:///var/lib/uffd/db.sqlite
FLASK_ENV="production"
SQLALCHEMY_DATABASE_URI="sqlite:////var/lib/uffd/db.sqlite"
......@@ -59,7 +59,12 @@ def create_app(test_config=None): # pylint: disable=too-many-locals
register_template_helper(app)
setup_navbar(app)
os.makedirs(app.instance_path, exist_ok=True)
# We never want to fail here, but at a file access that doesn't work.
# We might only have read access to app.instance_path
try:
os.makedirs(app.instance_path, exist_ok=True)
except:
pass
db.init_app(app)
Migrate(app, db, render_as_batch=True, directory='uffd/migrations')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment