-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
94 lines (84 loc) · 2.19 KB
/
.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
stages:
- pycodestyle
- unit_test
- functional_test
- build-ui
# This is NOT a job and will be ignored by GitLab-CI
.init_env_pycodestyle_unittest: &init_env # This is an anchor
before_script:
- cd $CI_PROJECT_DIR/$DIR
- virtualenv --system-site-packages --python=python3 venv
- venv/bin/pip install --quiet pycodestyle nosexcover pylint
- venv/bin/pip install -r requirements.txt
- venv/bin/pip install ../common/
common_pycodestyle:
<<: *init_env
stage: pycodestyle
variables:
DIR: common
script:
- venv/bin/pycodestyle src tests
common_test:
<<: *init_env
stage: unit_test
variables:
DIR: common
script:
- venv/bin/nosetests --with-coverage --cover-xml --cover-package=irma.common --with-xunit --cover-erase tests/
frontend_pycodestyle:
<<: *init_env
stage: pycodestyle
variables:
DIR: frontend
script:
- venv/bin/pycodestyle config extras api tests --exclude=extras/migration
frontend_test:
<<: *init_env
stage: unit_test
variables:
DIR: frontend
script:
- venv/bin/nosetests --with-coverage --cover-xml --cover-package=api,config --with-xunit --cover-erase tests/
brain_pycodestyle:
<<: *init_env
stage: pycodestyle
variables:
DIR: brain
script:
- venv/bin/pycodestyle config extras brain tests --exclude=tests/old,extras/migration
brain_test:
<<: *init_env
stage: unit_test
variables:
DIR: brain
script:
- venv/bin/nosetests --with-coverage --cover-xml --cover-package=brain --with-xunit --cover-erase tests/
probe_pycodestyle:
<<: *init_env
stage: pycodestyle
variables:
DIR: probe
script:
- venv/bin/pycodestyle config probe tests --exclude=tests/old
probe_test:
<<: *init_env
stage: unit_test
variables:
DIR: probe
script:
- venv/bin/nosetests --with-coverage --cover-xml --cover-package=probe --with-xunit --cover-erase tests/
web-ui:
stage: build-ui
before_script:
- cd $CI_PROJECT_DIR/frontend/web
script:
- npm install
- ./node_modules/.bin/bower update
- ./node_modules/.bin/gulp dist
- cp -a dist $CI_PROJECT_DIR/
artifacts:
name: "core-webui-${CI_BUILD_REF_NAME}"
expire_in: 1 week
paths:
- dist/
when: manual