.gitlab-ci.yml 1.77 KB
Newer Older
Timothée Mazzucotelli's avatar
Timothée Mazzucotelli committed
1 2 3 4 5 6
stages:
  - lint
  - test
  - build
  - deploy

7
py34-django111:
Timothée Mazzucotelli's avatar
Timothée Mazzucotelli committed
8 9 10 11
  image: python:3.4
  stage: test
  before_script:
  - pip install tox
12
  script: tox -e py34-django111
Timothée Mazzucotelli's avatar
Timothée Mazzucotelli committed
13

14
py35-django111:
Timothée Mazzucotelli's avatar
Timothée Mazzucotelli committed
15 16 17 18
  image: python:3.5
  stage: test
  before_script:
  - pip install tox
19
  script: tox -e py35-django111
Timothée Mazzucotelli's avatar
Timothée Mazzucotelli committed
20

21
py36-django111:
Timothée Mazzucotelli's avatar
Timothée Mazzucotelli committed
22 23 24 25
  image: python:3.6
  stage: test
  before_script:
  - pip install tox
26
  script: tox -e py36-django111
Timothée Mazzucotelli's avatar
Timothée Mazzucotelli committed
27

28
py37-django111:
Timothée Mazzucotelli's avatar
Timothée Mazzucotelli committed
29 30 31 32
  image: python:3.7-rc-stretch
  stage: test
  before_script:
  - pip install tox
33
  script: tox -e py37-dev-django111
Timothée Mazzucotelli's avatar
Timothée Mazzucotelli committed
34

35
py34-django20:
Timothée Mazzucotelli's avatar
Timothée Mazzucotelli committed
36 37 38 39
  image: python:3.4
  stage: test
  before_script:
  - pip install tox
40
  script: tox -e py34-django20
Timothée Mazzucotelli's avatar
Timothée Mazzucotelli committed
41

42
py35-django20:
Timothée Mazzucotelli's avatar
Timothée Mazzucotelli committed
43 44 45 46
  image: python:3.5
  stage: test
  before_script:
  - pip install tox
47
  script: tox -e py35-django20
Timothée Mazzucotelli's avatar
Timothée Mazzucotelli committed
48

49
py36-django20:
Timothée Mazzucotelli's avatar
Timothée Mazzucotelli committed
50 51 52 53
  image: python:3.6
  stage: test
  before_script:
  - pip install tox
54
  script: tox -e py36-django20
Timothée Mazzucotelli's avatar
Timothée Mazzucotelli committed
55

56
py37-django20:
Timothée Mazzucotelli's avatar
Timothée Mazzucotelli committed
57 58 59 60
  image: python:3.7-rc-stretch
  stage: test
  before_script:
  - pip install tox
61
  script: tox -e py37-dev-django20
Timothée Mazzucotelli's avatar
Timothée Mazzucotelli committed
62 63 64 65 66



safety:
  stage: lint
67 68
  before_script:
  - pip install tox
Timothée Mazzucotelli's avatar
Timothée Mazzucotelli committed
69 70 71 72 73
  script: tox -e safety
  allow_failure: true

style:
  stage: lint
74 75
  before_script:
  - pip install tox
Timothée Mazzucotelli's avatar
Timothée Mazzucotelli committed
76 77 78 79 80
  script: tox -e style
  allow_failure: true

docs:
  stage: lint
81 82
  before_script:
  - pip install tox
Timothée Mazzucotelli's avatar
Timothée Mazzucotelli committed
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
  script: tox -e docs
  allow_failure: true




build:
  image: docker:latest
  services:
    - docker:dind
  stage: build
  script: echo "Build Docker images"

deploy_staging:
  stage: deploy
  script:
    - echo "Deploy to staging server"
  environment:
    name: staging
    url: https://staging.example.com
  only:
    - master

deploy_prod:
  stage: deploy
  script:
    - echo "Deploy to production server"
  environment:
    name: production
    url: https://example.com
  when: manual
  only:
    - master