-
Notifications
You must be signed in to change notification settings - Fork 12
/
.gitlab-ci.yml
100 lines (85 loc) · 2.66 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
95
96
97
98
99
100
stages:
- checks
- product-lines
- tests
.deps: &deps
before_script:
- /opt/usr/local/python3.10-klever/bin/python3 -m venv venv
- venv/bin/python3 -m pip install --upgrade pip setuptools==70.3.0 setuptools_scm wheel
- venv/bin/python3 -m pip install --upgrade -r requirements.txt .
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_PIPELINE_SOURCE == "schedule"
unit-tests:
<<: *deps
stage: checks
script:
- venv/bin/pytest klever
pylint:
<<: *deps
stage: checks
script:
- venv/bin/python3 -m pip install pylint
- venv/bin/pylint $(git ls-files 'klever/*.py')
.option-check: &option-check
<<: *deps
stage: product-lines
interruptible: true
script:
- venv/bin/python3 ci-option-inject.py --config ci-config/options-injection-config.yml --name $OPTION_NAME
- sudo venv/bin/klever-deploy-local --source-directory . --deployment-directory /opt/bin --data-directory /opt/build-bases --log-level DEBUG update testing
- sleep 10s # TODO: Bridge somehow can not be initialized after deployment, need to wait a bit
- venv/bin/python3 ci-test-run.py --job_file=ci-config/job-sample.yml --job_name="Loadable kernel modules sample"
consul-option:
<<: *option-check
variables:
OPTION_NAME: consul
.integration-tests: &integration-tests
<<: *deps
stage: tests
interruptible: true
script:
# build bases are very large and should be prepared separately
- sudo venv/bin/klever-deploy-local --source-directory . --deployment-directory /opt/bin --data-directory /opt/build-bases --log-level DEBUG update testing
- sleep 10s # TODO: Bridge somehow can not be initialized after deployment, need to wait a bit
- venv/bin/python3 ci-test-run.py --job_file=$JOB_FILE
artifacts:
paths:
- "job-versions-solution-results.json"
when: on_failure
.integration-tests-nightly: &integration-tests-nightly
<<: *integration-tests
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
sample-tests:
<<: *integration-tests
variables:
JOB_FILE: ci-config/job-sample.yml
verifier-tests:
<<: *integration-tests
variables:
JOB_FILE: ci-config/job-verifiers.yml
stable-branch-bugs:
<<: *integration-tests
variables:
JOB_FILE: ci-config/job-bugs.yml
fixed-bugs:
<<: *integration-tests
variables:
JOB_FILE: ci-config/job-bugs-3.yml
rule-tests:
<<: *integration-tests
variables:
JOB_FILE: ci-config/job-reqs.yml
model-tests:
<<: *integration-tests
variables:
JOB_FILE: ci-config/job-models.yml
components-tests:
<<: *integration-tests-nightly
variables:
JOB_FILE: ci-config/job-components.yml
found-bugs:
<<: *integration-tests-nightly
variables:
JOB_FILE: ci-config/job-bugs-2.yml