forked from se2p/FlaPy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
78 lines (68 loc) · 1.45 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
image: python:${PYTHON_VERSION}
stages:
- test
- deploy
before_script:
- python --version
- pip install poetry
- poetry install
.unit-tests: &unit-tests
stage: test
script:
- poetry run pytest -v --cov=flapy --cov-branch --cov-report html:cov_html --cov-report=term-missing tests/
artifacts:
paths:
- cov_html
unit-tests:python-3.8:
<<: *unit-tests
variables:
PYTHON_VERSION: '3.8-buster'
.nightly-tests:
only:
- schedules
stage: test
before_script:
- python --version
- pip install poetry
- poetry install
- poetry add --dev pytest-random-order
script:
- for ((i=1; i<=10; i++)); do echo "test run ${i}\n"; poetry run pytest -q --cov=flaky_analysis --cov-branch --random-order --random-order-bucket=global ; done
nightly-tests:python-3.8:
extends: .nightly-tests
variables:
PYTHON_VERSION: '3.8-buster'
.flake8:
stage: test
image: python:3.8-buster
script:
- poetry run flake8 .
.mypy:
stage: test
image: python:3.8-buster
script:
- poetry run mypy flapy
.pylint:
stage: test
image: python:3.8-buster
script:
- poetry run pylint flapy
.black:
stage: test
image: python:3.8-buster
script:
- poetry run black --check .
pages:
stage: deploy
variables:
PYTHON_VERSION: '3.8-buster'
dependencies:
- unit-tests:python-3.8
script:
- mv cov_html/ public/
artifacts:
paths:
- public
expire_in: 30 days
only:
- master