Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
dashboards
Commits
5091ee454a8b
Commit
1ddc1a65
authored
Sep 09, 2020
by
Laurent Peuch
Browse files
feat(qa): display if a cube uses pytest
parent
6cdd4c7b5140
Pipeline
#14829
passed with stages
in 2 minutes and 56 seconds
Changes
2
Pipelines
296
Hide whitespace changes
Inline
Side-by-side
qa_dashboard.py
View file @
5091ee45
...
...
@@ -65,6 +65,9 @@ for number, cube in enumerate(all_cubes):
if
has_py3_tests
:
env_name
=
[
x
for
x
in
tox_config
.
envconfigs
if
x
.
startswith
(
"py3"
)]
py3
=
tox_config
.
envconfigs
[
env_name
[
0
]]
has_pytest
=
any
((
"pytest"
in
x
for
x
in
py3
.
commands
))
deps
=
[
str
(
x
)
for
x
in
py3
.
deps
]
uses_dev_requirements
=
bool
([
x
for
x
in
deps
if
x
.
startswith
(
"-r"
)
and
x
.
endswith
(
"dev-requirements.txt"
)])
...
...
@@ -78,6 +81,11 @@ for number, cube in enumerate(all_cubes):
else
:
has_capture_deprecation_warnings
=
False
if
has_py2_tests
:
env_name
=
[
x
for
x
in
tox_config
.
envconfigs
if
x
.
startswith
(
"py2"
)]
py2
=
tox_config
.
envconfigs
[
env_name
[
0
]]
has_pytest
=
any
((
"pytest"
in
x
for
x
in
py2
.
commands
))
# has_doc8, check if has doc first
# has_pytest_html
# has_pytest_capture_deprecationwarnings
...
...
@@ -100,6 +108,7 @@ for number, cube in enumerate(all_cubes):
"has_readme_rst"
:
has_readme_rst
,
"has_py2_tests"
:
has_py2_tests
,
"has_py3_tests"
:
has_py3_tests
,
"has_pytest"
:
has_pytest
,
"has_check_manifest"
:
has_check_manifest
,
"has_black"
:
has_black
,
"has_mypy"
:
has_mypy
,
...
...
template/qa.html
View file @
5091ee45
...
...
@@ -9,6 +9,7 @@
<th>
readthedocs
</th>
<th>
py2 tests
</th>
<th>
py3 tests
</th>
<th>
uses pytest
</th>
<th>
check manifest
</th>
<th>
flake8
</th>
<th>
black
</th>
...
...
@@ -38,6 +39,7 @@
{% if cube["has_tox"] %}
<td
class=
"{{ "
true
"
if
cube
["
has_py2_tests
"]
else
""
}}"
></td>
<td
class=
"{{ "
true
"
if
cube
["
has_py3_tests
"]
else
"
false
"
}}"
></td>
<td
class=
"{{ "
true
"
if
cube
["
has_pytest
"]
else
"
false
"
}}"
></td>
<td
class=
"{{ "
true
"
if
cube
["
has_check_manifest
"]
else
"
false
"
}}"
></td>
<td
class=
"{{ "
true
"
if
cube
["
has_flake8
"]
else
"
false
"
}}"
></td>
<td
class=
"{{ "
true
"
if
cube
["
has_black
"]
else
"
false
"
}}"
></td>
...
...
@@ -57,6 +59,7 @@
<td></td>
<td></td>
<td></td>
<td></td>
{% endif %}
</tr>
{%- endmacro %}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment