aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2018-11-06 19:17:58 +0100
committerGravatar Johannes Christ <[email protected]>2018-11-06 19:17:58 +0100
commit8950d65fd3b72f9e73f6d7f539eee34633aef8bc (patch)
treebb23115814a69f635763e2841d82212a19afd9cf /.gitlab-ci.yml
parentInform about issues and setup help in README. (diff)
Omit image build step.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml75
1 files changed, 6 insertions, 69 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 22190d43..6d8a2552 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,4 @@
stages:
- - build
- lint
- test
- publish
@@ -13,6 +12,7 @@ variables:
services:
- postgres:11-alpine
before_script:
+ - python -m pip install -e .[test]
- python manage.py migrate
script:
- python manage.py test
@@ -25,70 +25,6 @@ variables:
POSTGRES_USER: django
SECRET_KEY: supersecret
-build-alpine-3.7:
- stage: build
- image: docker:dind
- before_script:
- - echo "$CI_JOB_TOKEN" | docker login -u gitlab-ci-token --password-stdin $CI_REGISTRY
- script:
- - >
- docker build
- --build-arg EXTRAS=test,lint
- -t $BASE_IMAGE_URL:alpine-3.7-$CI_COMMIT_REF_SLUG
- -f docker/app/alpine/3.7/Dockerfile
- .
- - docker push $BASE_IMAGE_URL:alpine-3.7-$CI_COMMIT_REF_SLUG
- tags:
- - docker
-
-build-alpine-3.6:
- stage: build
- image: docker:dind
- before_script:
- - echo "$CI_JOB_TOKEN" | docker login -u gitlab-ci-token --password-stdin $CI_REGISTRY
- script:
- - >
- docker build
- --build-arg EXTRAS=test,lint
- -t $BASE_IMAGE_URL:alpine-3.6-$CI_COMMIT_REF_SLUG
- -f docker/app/alpine/3.6/Dockerfile
- .
- - docker push $BASE_IMAGE_URL:alpine-3.6-$CI_COMMIT_REF_SLUG
- tags:
- - docker
-
-build-stretch-3.7:
- stage: build
- image: docker:dind
- before_script:
- - echo "$CI_JOB_TOKEN" | docker login -u gitlab-ci-token --password-stdin $CI_REGISTRY
- script:
- - >
- docker build
- --build-arg EXTRAS=test,lint
- -t $BASE_IMAGE_URL:stretch-3.7-$CI_COMMIT_REF_SLUG
- -f docker/app/stretch/3.7/Dockerfile
- .
- - docker push $BASE_IMAGE_URL:stretch-3.7-$CI_COMMIT_REF_SLUG
- tags:
- - docker
-
-build-stretch-3.6:
- stage: build
- image: docker:dind
- before_script:
- - echo "$CI_JOB_TOKEN" | docker login -u gitlab-ci-token --password-stdin $CI_REGISTRY
- script:
- - >
- docker build
- --build-arg EXTRAS=test,lint
- -t $BASE_IMAGE_URL:stretch-3.6-$CI_COMMIT_REF_SLUG
- -f docker/app/stretch/3.6/Dockerfile
- .
- - docker push $BASE_IMAGE_URL:stretch-3.6-$CI_COMMIT_REF_SLUG
- tags:
- - docker
-
lint-python:
stage: lint
image: $BASE_IMAGE_URL:alpine-3.7-$CI_COMMIT_REF_SLUG
@@ -117,8 +53,9 @@ lint-markdown:
test-3.7-alpine:
<<: *test-template
- image: $BASE_IMAGE_URL:alpine-3.7-$CI_COMMIT_REF_SLUG
+ image: python:3.7-alpine
before_script:
+ - python -m pip install -e .[test]
- python manage.py migrate
script:
- coverage run --branch manage.py test
@@ -130,15 +67,15 @@ test-3.7-alpine:
test-3.6-alpine:
<<: *test-template
- image: $BASE_IMAGE_URL:alpine-3.6-$CI_COMMIT_REF_SLUG
+ image: python:3.6-alpine
test-3.7-stretch:
<<: *test-template
- image: $BASE_IMAGE_URL:stretch-3.7-$CI_COMMIT_REF_SLUG
+ image: python:3.7-stretch
test-3.6-stretch:
<<: *test-template
- image: $BASE_IMAGE_URL:stretch-3.6-$CI_COMMIT_REF_SLUG
+ image: python:3.6-stretch
pages:
image: python:3.7-alpine