.gitlab-ci.yml 1.1 KB
Newer Older
David Haynes's avatar
David Haynes committed
1
services:
David Haynes's avatar
David Haynes committed
2
  - mysql:5.7
David Haynes's avatar
David Haynes committed
3 4 5 6

variables:
  MYSQL_DATABASE: wopen
  MYSQL_ROOT_PASSWORD: root
David Haynes's avatar
David Haynes committed
7
  WOPEN_ENV: dev
David Haynes's avatar
David Haynes committed
8

9 10 11 12 13
types:
  - test

before_script:
  - apt-get update -qy
David Haynes's avatar
David Haynes committed
14 15
  - apt-get install -y mysql-client default-libmysqlclient-dev python-mysqldb
    gdal-bin libproj-dev proj-data proj-bin binutils
16
  - cd whats-open/
17 18
  - pip install pipenv
  - pipenv install --system --deploy
David Haynes's avatar
David Haynes committed
19 20
  - export WOPEN_SECRET_KEY=$(dd if=/dev/urandom count=100 | tr -dc "A-Za-z0-9"
    | fold -w 60 | head -n1 2>/dev/null)
21 22
  - export WOPEN_EMAIL_DOMAIN="@masonlive.gmu.edu"
  - export WOPEN_DB_NAME="wopen"
23 24
  - export WOPEN_DB_USER="root"
  - export WOPEN_DB_PASSWORD="root"
25 26 27
  - export WOPEN_DB_HOST="mysql"
  - export WOPEN_DB_PORT=3306
  - export WOPEN_SUPERUSER=admin
28
  - python manage.py makemigrations
29
  - python manage.py makemigrations api
30
  - python manage.py migrate
David Haynes's avatar
David Haynes committed
31 32 33
  - echo "from django.contrib.auth import get_user_model; User =
    get_user_model(); User.objects.create_superuser('root',
    'root@srct.gmu.edu', 'root') " | python manage.py shell
34

David Haynes's avatar
David Haynes committed
35 36
whats-open-py3.7:
  image: library/python:3.7
37 38
  type: test
  script:
39
    - echo "Done 😄"