services: - registry.srct.gmu.edu/srct/go/db stages: - test - lint variables: MYSQL_DATABASE: go MYSQL_ROOT_PASSWORD: root before_script: - apt-get update -qy - apt-get install -y default-libmysqlclient-dev python-mysqldb redis-server - pip install -r requirements/ci.txt - nohup redis-server & - cd go/ - export GO_ENV="test" - export GO_SECRET_KEY="secret" - export GO_DB_NAME="go" - export GO_DB_USER="root" - export GO_DB_PASSWORD="root" - export GO_DB_HOST="mysql" - export GO_DB_PORT=3306 - export GO_ALLOWED_HOSTS="*" - export GO_EMAIL_DOMAIN="@masonlive.gmu.edu" - export GO_CAS_URL="https://cas.srct.gmu.edu/" - export GO_EMAIL_HOST= - export GO_EMAIL_PORT= - export GO_EMAIL_HOST_USER= - export GO_EMAIL_HOST_PASSWORD= - export GO_EMAIL_FROM= - export GO_EMAIL_TO= - python manage.py makemigrations - python manage.py makemigrations go - python manage.py migrate - 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 Go-py3.7: image: library/python:3.7 stage: test script: - python manage.py test Go-flake8: image: library/python:3.7 stage: lint script: - pip install flake8 - flake8 go/ --statistics --exit-zero