Commit 65b7ca16 authored by Bengfort's avatar Bengfort
Browse files

setup tests

parent db7533e3
......@@ -19,10 +19,10 @@ test-branch:
image: $PYTHON_IMAGE
script:
- apt-get update -q && apt-get install -y -qq $PYTHON_IMAGE_DEPENDENCIES
- pip3 install -e .
- pip3 install flake8
- pip3 install -e .[test]
- flake8
- django-admin makemigrations --dry-run --check --noinput --settings=scheduler.settings.development
- django-admin test --settings=scheduler.settings.development
build:
stage: build
......
......@@ -12,12 +12,17 @@ run:
install:
if [ ! -d "$(VIRTUAL_ENV)" ]; then python3 -m venv "$(VIRTUAL_ENV)"; fi
$(VIRTUAL_ENV)/bin/pip install -U pip
$(VIRTUAL_ENV)/bin/pip install -e .
$(VIRTUAL_ENV)/bin/pip install -e .[test]
npm install
$(MANAGEPY) migrate
$(MANAGEPY) shell -c "from django.contrib.auth.models import User; User.objects.filter(username='admin').exists() or User.objects.create_superuser('admin', 'admin@example.com', 'password')"
$(MANAGEPY) compilemessages -l de
.PHONY: test
test:
$(VIRTUAL_ENV)/bin/flake8 scheduler
$(MANAGEPY) test
.PHONY: makemessages
makemessages:
$(MANAGEPY) makemessages -l de -d django
......
......@@ -13,6 +13,11 @@ install_requires =
django-npm == 1.0.0
requests == 2.25.1
[options.extras_require]
test =
model-bakery
flake8
[flake8]
exclude =
.venv,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment