-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
44 lines (39 loc) · 921 Bytes
/
.gitlab-ci.yml
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
37
38
39
40
41
42
43
44
stages:
- lint
- test
variables:
POSTGRES_USER: 'django_sample'
POSTGRES_PASSWORD: ''
POSTGRES_DB: 'test_django_sample'
POSTGRES_HOST_AUTH_METHOD: trust
CELERY_BROKER_URL: 'redis://redis:6379/0'
flake8:
stage: lint
image: python:3.9-alpine
before_script:
- pip install -q flake8
script:
- flake8
pytest:
stage: test
image: docker/compose:latest
tags:
- docker
services:
- docker:dind
before_script:
- docker-compose -f local.yml build
# Ensure celerybeat does not crash due to non-existent tables
- docker-compose -f local.yml run --rm django python manage.py migrate
- docker-compose -f local.yml up -d
script:
- docker-compose -f local.yml run django pytest
neor-deploy:
image: python:3.9
stage: deploy
before_script:
pip3 install neorcli
script:
neorcli -t $NEOR_TOKEN update $NEOR_SERVICE_ID $CI_COMMIT_TAG
only:
- tags