CI: GitHub Annotate slow tests in partial test runs (#60359)

* CI: GitHub Annotate slow tests in partial test runs

* Correct line regex
pull/60365/head
Franck Nijhof 2021-11-25 21:45:14 +01:00 committed by GitHub
parent f2e03420d1
commit 9b4fb44fea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 0 deletions

View File

@ -653,6 +653,9 @@ jobs:
# However this plugin is fairly new and doesn't run correctly
# on a non-GitHub environment.
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)
if: needs.changes.outputs.test_full_suite == 'true'
run: |
@ -683,6 +686,8 @@ jobs:
--cov-report=xml \
--cov-report=term-missing \
-o console_output_style=count \
--durations=0 \
--durations-min=1 \
-p no:sugar \
tests/components/${{ matrix.group }}
- name: Upload coverage to Codecov (full coverage)

View 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
}
]
}
]
}