aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
blob: 131e2089ffe20c8de5ccf41116002f5ba8b3d95b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
stages:
    - build
    - lint
    - test

build base image:
    image: docker:stable-git
    stage: build
    script:
        - sh scripts/deploy-ci.sh
    tags:
        - docker
    only:
        - master
        - django
        - django+add-gitlab-ci

lint:
    image: registry.gitlab.com/python-discord/projects/site/django-base:latest
    stage: lint
    script:
        - pipenv install --dev --system
        - flake8

test:
    image: registry.gitlab.com/python-discord/projects/site/django-base:latest
    stage: test
    services:
        - postgres:10-alpine
    script:
        - python manage.py test
    variables:
        DATABASE_URL: postgres://django:supersecret@postgres/pysite
        POSTGRES_DB: pysite
        POSTGRES_PASSWORD: supersecret
        POSTGRES_USER: django