.gitlab-ci.yml 1023 Bytes
Newer Older
1
2
stages:
  - test
Florent Chehab's avatar
Florent Chehab committed
3
  - linting
4
5
6
  - 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:
Florent Chehab's avatar
Florent Chehab committed
30
  stage: linting
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
39
40
41
42
43
44
45
eslint:
  stage: linting
  image: pipelinecomponents/eslint:latest
  script:
    - cd frontend && npm run lint
  tags:
    - docker

Florent Chehab's avatar
Florent Chehab committed
46
pages:
47
48
  stage: doc
  image: floawfloaw/plantuml
Florent Chehab's avatar
Florent Chehab committed
49
50
51
  dependencies:
    - testing
  script:
52
53
    - mkdir .public
    - mv htmlcov/ .public/coverage
54
55
    - make documentation
    - mv documentation/ .public/documentation
56
    - mv .public public
Florent Chehab's avatar
Florent Chehab committed
57
58
59
60
  artifacts:
    paths:
      - public
    expire_in: 1 month
Florent Chehab's avatar
Florent Chehab committed
61
  only:
Florent Chehab's avatar
Florent Chehab committed
62
    - master
Florent Chehab's avatar
Florent Chehab committed
63
64
  tags:
    - docker