-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
56 lines (50 loc) · 1.1 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
.cache: &cache
cache:
key: "$CI_BUILD_REF_NAME"
paths:
- .tox
before_script:
- echo "HOME is $HOME"
- "[ -f $HOME/.gitlab_runner.sh ] && . $HOME/.gitlab_runner.sh"
stages:
- lint
- test
flake3:
tags:
- shell
stage: lint
allow_failure: false
script:
- virtualenv -p $(pyenv which python3.5) venv3
- source venv3/bin/activate
- python -m pip install -r requirements/all.txt
- python -m pip install -U flake8
- python -m flake8 mytb
isort:
tags:
- shell
stage: lint
allow_failure: false
script:
- "echo $(which python ; python -V 2>&1)"
- python -m pip install -U isort
- python -m pip freeze > pipfreeze.txt
- python -m pip check
- python -m isort --diff | tee isort_report.txt
artifacts:
when: always
paths:
- pipfreeze.txt
- isort_report.txt
- isort_errors.txt
expire_in: 1 month
tox:
<<: *cache
tags:
- shell
stage: test
allow_failure: true
script:
- virtualenv -p $(pyenv which python3.5) venv3
- source venv3/bin/activate ; python -m pip install tox
- tox