forked from lu-ci/apex-sigma-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
57 lines (43 loc) · 813 Bytes
/
.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
image: python:3.9
stages:
- prepare
- test
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache"
# -------[ Templates ]-------
.pip-cache: &pip-cache
key: "${CI_COMMIT_REF_SLUG}-1"
paths:
- .cache/
- venv/
.virtualenv: &venv
before_script:
- python -V
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
.push-cache: &push-cache
cache:
<<: *pip-cache
policy: push
.pull-cache: &pull-cache
cache:
<<: *pip-cache
policy: pull
.test-job: &test-job
<<: *pull-cache
stage: test
environment: test
# -------[ Jobs ]-------
setup:
<<: *venv
<<: *push-cache
stage: prepare
script:
- pip install -r requirements.txt -r requirements-test.txt
pytest:
<<: *test-job
<<: *venv
retry: 2
script:
- ./test.sh