aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2018-09-17 23:10:13 +0200
committerGravatar Johannes Christ <[email protected]>2018-09-17 23:51:13 +0200
commitcdf57428a68745d3178e8f00122dd4818f7ae423 (patch)
tree7d5f31028901daa59c3905a1f8847eabf2ba9c16 /.gitlab-ci.yml
parentUse proper multiline installation. (diff)
Properly add build directory.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml54
1 files changed, 28 insertions, 26 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fdb41c13..66e83da9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,7 +9,7 @@ image: python:3.7-alpine
.test-template: &test-template
stage: test
services:
- - postgres:10-alpine
+ - postgres:11-alpine
script:
- python manage.py test
tags:
@@ -62,6 +62,8 @@ build-stretch-3.6:
lint:
stage: lint
+ dependencies:
+ - build-alpine-3.7
image: docker:dind
before_script:
- docker load < django_alpine_py37.tar.gz
@@ -69,55 +71,55 @@ lint:
- docker run django:alpine-3.7 flake8
tags:
- docker
- dependencies:
- - build-alpine-3.7
-
test-3.7-alpine:
<<: *test-template
image: docker:dind
+ dependencies:
+ - build-alpine-3.7
before_script:
- - docker load < django:alpine-3.7
+ - docker load < docker_alpine_py37.tar.gz
- docker run --network=host --env DATABASE_URL=$DATABASE_URL django:alpine-3.7 python manage.py migrate
script:
- docker container run --network=host --env DATABASE_URL=$DATABASE_URL -v ./:/app django:alpine-3.7 coverage run --source=api,home,pysite,wiki --branch manage.py test
after_script:
- - docker contianer run -v ./:/app coverage report
+ - docker container run -v ./:/app coverage report
artifacts:
paths:
- .coverage
- dependencies:
- - build-alpine-3.7
test-3.6-alpine:
<<: *test-template
- image: python:3.6-alpine
+ image: docker:dind
+ dependencies:
+ - build-alpine-3.6
before_script:
- - apk add git libpq postgresql-dev gcc cmake autoconf automake musl-dev
- - python3 -m pip install --no-cache-dir .[test]
- - python manage.py migrate
+ - docker load < docker_alpine_py36.tar.gz
+ - docker run --network=host --env DATABASE_URL=$DATABASE_URL django:alpine-3.6 python manage.py migrate
+ script:
+ - docker container run --network=host --env DATABASE_URL=$DATABASE_URL django:alpine-3.6 python manage.py test
test-3.7-stretch:
<<: *test-template
- image: python:3.7-stretch
- services:
- - postgres:11
+ image: docker:dind
+ dependencies:
+ - build-stretch-3.7
before_script:
- - apt-get update -y
- - apt-get install -y git libpq-dev gcc cmake autoconf automake libc-dev
- - python3 -m pip install --no-cache-dir .[test]
- - python manage.py migrate
+ - docker load < docker_stretch_py37.tar.gz
+ - docker run --network=host --env DATABASE_URL=$DATABASE_URL django:stretch-3.7 python manage.py migrate
+ script:
+ - docker container run --network=host --env DATABASE_URL=$DATABASE_URL django:stretch-3.7 python manage.py test
test-3.6-stretch:
<<: *test-template
- image: python:3.6-stretch
- services:
- - postgres:11
+ image: docker:dind
+ dependencies:
+ - build-stretch-3.6
before_script:
- - apt-get update -y
- - apt-get install -y git libpq-dev gcc cmake autoconf automake libc-dev
- - python3 -m pip install --no-cache-dir .[test]
- - python manage.py migrate
+ - docker load < docker_stretch_py36.tar.gz
+ - docker run --network=host --env DATABASE_URL=$DATABASE_URL django:stretch-3.6 python manage.py migrate
+ script:
+ - docker container run --network=host --env DATABASE_URL=$DATABASE_URL django:stretch-3.6 python manage.py test
pages:
stage: publish