-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
122 lines (109 loc) · 2.57 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
stages:
- analysis
- test
- science tests
- build
- deploy
image: python:3.9
include:
- template: Dependency-Scanning.gitlab-ci.yml
documentation-coverage:
stage: analysis
allow_failure: true
script:
- pip install docstr-coverage
- docstr-coverage -F 60.0 heron
coverage: '/Total coverage: (\d+\.\d+%)/'
pylint:
stage: analysis
allow_failure: true
before_script:
- pip install pylint
script:
- pylint heron/*
flake8:
stage: analysis
allow_failure: false
before_script:
- pip install flake8 flake8_formatter_junit_xml
script:
- flake8 --count --select=E9,F63,F7,F82 --format junit-xml --verbose heron > report.xml
# exit-zero treats all errors as warnings.
- flake8 --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics heron/
artifacts:
reports:
junit: report.xml
test-python38:
stage: test
image: python:3.8
script:
- pip install numpy
- pip install -r requirements.txt
- pip install -r requirements_test.txt
- python setup.py test
test-python39:
stage: test
image: python:3.9
before_script:
- pip install coverage unittest-xml-reporting
script:
- pip install numpy
- pip install -r requirements.txt
- pip install -r requirements_test.txt
- coverage run -m xmlrunner discover tests/ -o junit-reports
#- coverage report
#- coverage xml
# artifacts:
# when: always
# paths:
# - public/coverage.txt
# reports:
# junit: junit-reports/*
# coverage_report:
# coverage_format: cobertura
# path: coverage.xml
coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
test-python310:
stage: test
image: python:3.10
script:
- pip install numpy
- pip install -r requirements.txt
- pip install -r requirements_test.txt
- python setup.py test
test-python311:
stage: test
image: python:3.11
script:
- pip install numpy
- pip install -r requirements.txt
- pip install -r requirements_test.txt
- python setup.py test
allow_failure: True
####
# Science Tests
####
science-python39:
stage: science tests
image: python:3.9
script:
- pip install numpy
- pip install -r requirements.txt
- pip install -r requirements_test.txt
- python -m unittest discover science-tests/
allow_failure: True
pages:
image: sphinxdoc/sphinx
stage: build
script:
- pip install numpy
- pip install -r requirements.txt
- pip install -r requirements_dev.txt
- pip install .
- make docs
- mv docs/_build/html/ public/
artifacts:
paths:
- public
only:
- master