.gitlab-ci.yml 4.43 KB
Newer Older
1
image: registry-gitlab.pasteur.fr/aperrin/pipeline_annotation/testing-ubuntu
2

3

4
5
6
stages:
  - build
  - test
7
  - test2
Amandine  PERRIN's avatar
Amandine PERRIN committed
8
  - coverage
9
  - doc
10
  - deploy
Amandine  PERRIN's avatar
Amandine PERRIN committed
11
  - github
12

13

14
15
16
17
18
19
20
21
build-from-ubuntu:
  image: registry-gitlab.pasteur.fr/aperrin/pipeline_annotation/install-ubuntu
  stage: build
  only:
    - install
  script:
    - pip3 install --upgrade pip
    - pip3 install -r requirements-dev.txt
Amandine  PERRIN's avatar
Amandine PERRIN committed
22
    - py.test test/test_install/test_make_ubuntu.py -xv
23

24
25
26
27
28
29
30
31
build-from-barrnap:
  image: registry-gitlab.pasteur.fr/aperrin/pipeline_annotation/install-ubuntu-barrnaponly
  stage: build
  only:
    - install
  script:
    - pip3 install --upgrade pip
    - pip3 install -r requirements-dev.txt
Amandine  PERRIN's avatar
Amandine PERRIN committed
32
    - py.test test/test_install/test_make_barrnap.py -xv
33

34
build-from-prokka-quicktree:
35
36
37
38
39
40
41
  image: registry-gitlab.pasteur.fr/aperrin/pipeline_annotation/install-ubuntu-annote-quicktree
  stage: build
  only:
    - install
  script:
    - pip3 install --upgrade pip
    - pip3 install -r requirements-dev.txt
Amandine  PERRIN's avatar
Amandine PERRIN committed
42
    - py.test test/test_install/test_make_prokka-quicktree.py -xv
43

44
45
46
47
48
49
50
51
build-from-prodigal:
  image: registry-gitlab.pasteur.fr/aperrin/pipeline_annotation/install-prodigal
  stage: build
  only:
    - install
  script:
    - pip3 install --upgrade pip
    - pip3 install -r requirements-dev.txt
Amandine  PERRIN's avatar
Amandine PERRIN committed
52
    - py.test test/test_install/test_make_prodigal.py -xv
53

54
55
56
57
58
build-from-test-image:
  stage: build
  only:
    - install
  script:
59
    - pip3 install --upgrade pip
60
    - pip3 install -r requirements-dev.txt
Amandine  PERRIN's avatar
Amandine PERRIN committed
61
    - py.test test/test_install/test_make_all-installed.py -xv
62

63

64
unit-test-ubuntu:
65
66
67
68
69
70
71
72
73
74
  stage: test
  except:
    - docker
    - helpers
    - install
  before_script:
    - pip3 install --upgrade pip
    - pip3 install -r requirements-dev.txt
    - ./make
  script:
75
    - pwd
Amandine  PERRIN's avatar
Amandine PERRIN committed
76
    - ls Examples/genomes_init/genome1.fst
77
    - py.test test/test_unit/test_utils.py -vx
78
79
80
    - py.test test/test_unit/test_utils-logging.py -xv
    - py.test test/test_unit/test_utils-pan.py -vx
    - py.test test/test_unit/test_utils-argparse.py -vx
Amandine  PERRIN's avatar
Amandine PERRIN committed
81
    - py.test test/test_unit/test_prepare -v -x
82
    - py.test test/test_unit/test_annotate/test_genome_func.py -vx
Amandine  PERRIN's avatar
Amandine PERRIN committed
83
    - py.test test/test_unit/test_annotate/test_annotation*  -vx
84
85
86
    - py.test test/test_unit/test_annotate/test_format* -v -x
    - py.test test/test_unit/test_pangenome -vx
    - py.test test/test_unit/test_corepers -vx
87
    - py.test test/test_unit/test_align -vx
88
    - py.test test/test_unit/test_tree -xv
89
    # - coverage report
90
    - mv .coverage .coverage.unit
91
92
  artifacts:
    paths:
93
      - .coverage.unit
94
95
    expire_in: 1 hour

96
func-test-ubuntu:
97
  stage: test
98
99
100
101
102
103
104
105
106
  except:
    - docker
    - helpers
    - install
  before_script:
    - pip3 install --upgrade pip
    - pip3 install -r requirements-dev.txt
    - ./make
  script:
107
    - pwd
108
109
110
111
112
113
114
115
116
117
    - py.test test/test_functional/test_pangenome.py -vx
    - py.test test/test_functional/test_pangenome-parser.py -vx
    - py.test test/test_functional/test_corepers* -vx
    - py.test test/test_functional/test_align-parser.py -vx
    - py.test test/test_functional/test_align.py -vx
    - py.test test/test_functional/test_tree* -vx
    - py.test test/test_functional/test_annote-parser.py -vx
    - py.test test/test_functional/test_annote.py -xv
    - py.test test/test_functional/test_all* -vx
    - py.test test/test_functional/test_prepare* -vx
118
    # - coverage report
119
120
121
122
123
124
    - mv .coverage .coverage.functional
  artifacts:
    paths:
      - .coverage.functional
    expire_in: 1 hour
    
125

Amandine  PERRIN's avatar
Amandine PERRIN committed
126
127
128
129
130
131
132
coverage:
  stage: coverage
  except:
    - docker
    - helpers
    - install
  dependencies:
133
    - unit-test-ubuntu
134
    - func-test-ubuntu
Amandine  PERRIN's avatar
Amandine PERRIN committed
135
  before_script:
136
    - pip3 install --upgrade pip
Amandine  PERRIN's avatar
Amandine PERRIN committed
137
138
    - pip3 install -r requirements-dev.txt
  script:
139
    - pwd
140
    - coverage combine .coverage.unit .coverage.functional
141
    - coverage html
Amandine  PERRIN's avatar
Amandine PERRIN committed
142
    - coverage report
Amandine  PERRIN's avatar
Amandine PERRIN committed
143
144
    # test coverage parsing: \d+\%\s*$
    # or pytest-cov (Python): ^TOTAL.+?(\d+\%)$
Amandine  PERRIN's avatar
Amandine PERRIN committed
145
146
147
148
  artifacts:
    paths:
      - htmlcov
    expire_in: 1 hour
149
150
151
152
153
154


sphinx-doc:
  stage: doc
  only:
    - master
155
    - documentation
156
157
158
159
160
161
162
163
164
165
166
167
  before_script:
    - pip3 install -r requirements-dev.txt
    - ./make
  script:
    - cd doc/source
    - make html
  artifacts:
    paths:
      - doc/build/html
    expire_in: 1 hour


Amandine  PERRIN's avatar
Amandine PERRIN committed
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
pages:
  stage: deploy
  only:
    - doc
    - master
  dependencies:
    - coverage
    - sphinx-doc
  script:
    - mkdir -p public/htmlcov
    - mv htmlcov public
    - mkdir -p public/html-doc
    - mv doc/build/html html-doc
    - mv html-doc public
  artifacts:
    paths:
      - public
    expire_in: 1 hour