Edit GitLab CI
This commit is contained in:
+17
-1
@@ -1,5 +1,15 @@
|
||||
image: python:3.5
|
||||
|
||||
services:
|
||||
- postgres:latest
|
||||
|
||||
variables:
|
||||
POSTGRES_DB: sik
|
||||
|
||||
before_script:
|
||||
- python -V
|
||||
- pip install -r requirements.txt
|
||||
|
||||
stages:
|
||||
- build
|
||||
- lint
|
||||
@@ -7,15 +17,21 @@ stages:
|
||||
|
||||
build:
|
||||
stage: build
|
||||
variables:
|
||||
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB"
|
||||
script:
|
||||
- sh ./scripts/autoinstall.sh
|
||||
|
||||
lint:
|
||||
stage: lint
|
||||
variables:
|
||||
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB"
|
||||
script:
|
||||
- pep8 --count && eslint .
|
||||
|
||||
test:
|
||||
stage: test
|
||||
variables:
|
||||
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB"
|
||||
script:
|
||||
- docker-compose run web python manage.py test
|
||||
- docker-compose run web python manage.py test --settings sikweb.ci-settings
|
||||
|
||||
Reference in New Issue
Block a user