summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-08-03 19:23:33 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-08-03 19:23:33 +0200
commit7a8c870226fca16da3df77320fd61c53974f81da (patch)
tree9ff06bfe1cbbc938eff7c68fd6cc2c4bb77d0b1f
parent4a2844e0f9586f3bd16576f0e2d162033dd42d63 (diff)
downloadChimère-7a8c870226fca16da3df77320fd61c53974f81da.tar.bz2
Chimère-7a8c870226fca16da3df77320fd61c53974f81da.zip
Add CI management
-rw-r--r--.gitlab-ci.yml18
-rw-r--r--Makefile.example3
-rw-r--r--chimere_example_project/settings.py12
3 files changed, 27 insertions, 6 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..f8d5f4e
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,18 @@
+before_script:
+ - apt-get update
+ - apt-get install -q -y python3-pip libpq-dev python3-dev
+ - pip3 install -q -r requirements.txt
+ - cp Makefile.example Makefile
+
+variables:
+ POSTGRES_DB: morrigan
+ POSTGRES_USER: morrigan
+ POSTGRES_PASSWORD: "morrigan"
+
+services:
+ - postgres:9.1
+
+master:
+ script: "make test_gitlab"
+ only:
+ - master
diff --git a/Makefile.example b/Makefile.example
index e50bace..4ac65cb 100644
--- a/Makefile.example
+++ b/Makefile.example
@@ -16,6 +16,9 @@ clean:
test: clean
cd $(project); $(PYTHON) manage.py test chimere
+test_gitlab:
+ cd $(project); $(PYTHON) manage.py test chimere
+
pep8:
pep8 --filename=*.py --ignore=W --exclude="manage.py,settings.py,migrations" --statistics --repeat .
diff --git a/chimere_example_project/settings.py b/chimere_example_project/settings.py
index 86b61e3..187d4ba 100644
--- a/chimere_example_project/settings.py
+++ b/chimere_example_project/settings.py
@@ -166,17 +166,17 @@ MANAGERS = ADMINS
DATABASES = {
'default': {
- 'NAME': 'ratatouille',
+ 'NAME': 'chimere',
'ENGINE': 'django.contrib.gis.db.backends.postgis',
- 'HOST': 'localhost',
+ 'HOST': 'postgres',
'PORT': '5432',
- 'USER': 'ratatouille',
- 'PASSWORD': 'wiki',
+ 'USER': 'chimere',
+ 'PASSWORD': 'chimere',
},
}
-if 'test' in sys.argv:
- SOUTH_TESTS_MIGRATE = False
+# if 'test' in sys.argv:
+# SOUTH_TESTS_MIGRATE = False
# Local time zone for this installation. Choices can be found here:
# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html