.gitlab-ci.yml 891 Bytes
Newer Older
1
2
3
4
5
6
stages:
  - test
  - syntaxe
  - doc
  - deploy

Florent Chehab's avatar
Florent Chehab committed
7
8
9
10
11
12
variables:
  ENV: CI
  POSTGRES_DB: outgoing
  POSTGRES_USER: outgoing
  POSTGRES_PASSWORD: ""

Florent Chehab's avatar
Florent Chehab committed
13
14
testing:
  stage: test
Florent Chehab's avatar
Florent Chehab committed
15
16
17
  image: python:3.6.5-jessie
  services:
    - postgres:9.6.8
Florent Chehab's avatar
Florent Chehab committed
18
  script:
19
20
21
    - make install_backend
    - make check_backend
    - make test_backend_server
Florent Chehab's avatar
Florent Chehab committed
22
23
24
25
26
27
28
  artifacts:
    paths:
      - htmlcov/
    expire_in: 1 month
  tags:
    - docker

Florent Chehab's avatar
linting  
Florent Chehab committed
29
flake8:
30
  stage: syntaxe
Florent Chehab's avatar
Florent Chehab committed
31
  image: python:3.6.5-jessie
Florent Chehab's avatar
linting  
Florent Chehab committed
32
  script:
Florent Chehab's avatar
clean  
Florent Chehab committed
33
    - pip install flake8
34
    - cd backend && flake8
Florent Chehab's avatar
linting  
Florent Chehab committed
35
36
37
  tags:
    - docker

Florent Chehab's avatar
Florent Chehab committed
38
pages:
39
40
  stage: doc
  image: floawfloaw/plantuml
Florent Chehab's avatar
Florent Chehab committed
41
42
43
  dependencies:
    - testing
  script:
44
45
    - mkdir .public
    - mv htmlcov/ .public/coverage
46
47
    - make documentation
    - mv documentation/ .public/documentation
48
    - mv .public public
Florent Chehab's avatar
Florent Chehab committed
49
50
51
52
  artifacts:
    paths:
      - public
    expire_in: 1 month
Florent Chehab's avatar
Florent Chehab committed
53
54
  only: 
    - master
Florent Chehab's avatar
Florent Chehab committed
55
56
  tags:
    - docker