This repository has been archived by the owner on Nov 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
44 lines (40 loc) · 1.54 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
services:
- mysql:5.7
variables:
MYSQL_DATABASE: wopen
MYSQL_ROOT_PASSWORD: root
types:
- test
before_script:
- apt-get update -qy
- apt-get install -y default-mysql-client default-libmysqlclient-dev python-mysqldb graphviz
gdal-bin libproj-dev proj-data proj-bin binutils
- cd whats-open/
- pip install pipenv
- pipenv install --system --deploy
- export WOPEN_SECRET_KEY=$(dd if=/dev/urandom count=100 | tr -dc "A-Za-z0-9"
| fold -w 60 | head -n1 2>/dev/null)
- export WOPEN_EMAIL_DOMAIN="@masonlive.gmu.edu"
- export WOPEN_DB_NAME="wopen"
- export WOPEN_DB_USER="root"
- export WOPEN_DB_PASSWORD="root"
- export WOPEN_DB_HOST="mysql"
- export WOPEN_DB_PORT=3306
- export WOPEN_SUPERUSER=admin
- export WOPEN_ENV=dev
- python manage.py makemigrations
- python manage.py makemigrations api
- python manage.py migrate
- echo "from django.contrib.auth.models import User; User.objects.filter(username='$WOPEN_SUPERUSER$WOPEN_EMAIL_DOMAIN').delete(); User.objects.create_superuser('$WOPEN_SUPERUSER$WOPEN_EMAIL_DOMAIN', '$WOPEN_SUPERUSER', 'admin')" | python manage.py shell
- python3 manage.py loaddata --format json categoriesFixture locationFixture openTimeFixture scheduleFixture settingsFixture
- python manage.py graph_models --dot --group api > erd.dot
- dot -Tpng erd.dot > erd.png
whats-open-py3.7:
artifacts:
paths:
- whats-open/erd.png
expire_in: 1 week
image: library/python:3.7
type: test
script:
- python3 manage.py test --verbosity 2 --keepdb --noinput api.tests.APIClientTests