Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
roomlist
Commits
064b1491
Commit
064b1491
authored
Dec 23, 2016
by
Daniel W Bond
Browse files
created a gitlab ci file... let's see if this will work on the first try (it won't)
parent
c240b180
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
064b1491
image
:
ubuntu:14.04
services
:
-
mysql:latest
types
:
-
test
variables
:
MYSQL_DATABASE
:
roomlist
MYSQL_ROOT_PASSWORD
:
root
test_Roomlist
:
type
:
test
before_script
:
-
apt-get update -qy
-
apt-get install -y python-dev python-pip libldap2-dev mysql-server mysql-client libmysqlclient-dev python-mysqldb libsasl2-dev libjpeg-dev git
-
pip install -r requirements.txt
-
pip install coverage
-
cp roomlist/settings/secret.py.template roomlist/settings/secret.py
-
export SECRET_KEY=$(dd if=/dev/urandom count=100 | tr -dc "A-Za-z0-9" | fold -w 60 | head -n1 2>/dev/null)
-
sed -i go/settings/secret.py -e 's/DB_PASSWORD.*/DB_PASSWORD = \"root\"/'
-
cd roomlist
-
python manage.py makemigrations accounts
-
python manage.py makemigrations housing
-
python manage.py makemigrations
-
python manage.py migrate
-
python manage.py loaddata accounts/major_fixtures.json
-
python manage.py shell < housing/housing_obj_creator.py
-
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
script
:
-
cd ..
-
coverage run --source=roomlist ./roomlist/manage.py test
-
coverage html
-
grep pc_cov htmlcov/index.html | egrep -o "[0-9]+\%" | awk '{ print "covered " $1;}'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment