mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 22:57:17 +00:00
CI: GitHub Annotate slow tests in partial test runs (#60359)
* CI: GitHub Annotate slow tests in partial test runs * Correct line regex
This commit is contained in:
parent
f2e03420d1
commit
9b4fb44fea
5
.github/workflows/ci.yaml
vendored
5
.github/workflows/ci.yaml
vendored
@ -653,6 +653,9 @@ jobs:
|
|||||||
# However this plugin is fairly new and doesn't run correctly
|
# However this plugin is fairly new and doesn't run correctly
|
||||||
# on a non-GitHub environment.
|
# on a non-GitHub environment.
|
||||||
pip install pytest-github-actions-annotate-failures==0.1.3
|
pip install pytest-github-actions-annotate-failures==0.1.3
|
||||||
|
- name: Register pytest slow test problem matcher
|
||||||
|
run: |
|
||||||
|
echo "::add-matcher::.github/workflows/matchers/pytest-slow.json"
|
||||||
- name: Run pytest (fully)
|
- name: Run pytest (fully)
|
||||||
if: needs.changes.outputs.test_full_suite == 'true'
|
if: needs.changes.outputs.test_full_suite == 'true'
|
||||||
run: |
|
run: |
|
||||||
@ -683,6 +686,8 @@ jobs:
|
|||||||
--cov-report=xml \
|
--cov-report=xml \
|
||||||
--cov-report=term-missing \
|
--cov-report=term-missing \
|
||||||
-o console_output_style=count \
|
-o console_output_style=count \
|
||||||
|
--durations=0 \
|
||||||
|
--durations-min=1 \
|
||||||
-p no:sugar \
|
-p no:sugar \
|
||||||
tests/components/${{ matrix.group }}
|
tests/components/${{ matrix.group }}
|
||||||
- name: Upload coverage to Codecov (full coverage)
|
- name: Upload coverage to Codecov (full coverage)
|
||||||
|
18
.github/workflows/matchers/pytest-slow.json
vendored
Normal file
18
.github/workflows/matchers/pytest-slow.json
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"problemMatcher": [
|
||||||
|
{
|
||||||
|
"owner": "python",
|
||||||
|
"pattern": [
|
||||||
|
{
|
||||||
|
"regexp": "^=+ slowest durations =+$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"regexp": "^((.*s)\\s(call|setup|teardown)\\s+(.*)::(.*))$",
|
||||||
|
"message": 1,
|
||||||
|
"file": 2,
|
||||||
|
"loop": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user