This repository was archived by the owner on Nov 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
52 lines (47 loc) · 1.52 KB
/
.gitlab-ci.yml
File metadata and controls
52 lines (47 loc) · 1.52 KB
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
45
46
47
48
49
50
51
52
services:
- name: registry.srct.gmu.edu/srct/go/db
alias: mysql
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=$(python -c 'import random; import string; print("".join([random.SystemRandom().choice("{}{}{}".format(string.ascii_letters, string.digits, string.punctuation)) for i in range(50)]))')
- 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://login.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=
- export GO_STATIC_ROOT=/static
- 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