ci(lesavka): keep support folders out of category metrics
This commit is contained in:
parent
b1987abbee
commit
81a4bbcc64
@ -83,10 +83,13 @@ test_category_names = {
|
|||||||
'integration', 'manual', 'performance', 'regression', 'reliability',
|
'integration', 'manual', 'performance', 'regression', 'reliability',
|
||||||
'security', 'smoke', 'system', 'ui', 'unit',
|
'security', 'smoke', 'system', 'ui', 'unit',
|
||||||
}
|
}
|
||||||
|
support_category_names = {'fixtures', 'golden', 'helpers'}
|
||||||
|
|
||||||
def normalize_category(category: str) -> str:
|
def normalize_category(category: str) -> str:
|
||||||
if category in test_category_names:
|
if category in test_category_names:
|
||||||
return category
|
return category
|
||||||
|
if category in support_category_names:
|
||||||
|
return 'uncategorized'
|
||||||
return 'uncategorized'
|
return 'uncategorized'
|
||||||
|
|
||||||
manifest_path = pathlib.Path('tests/test-taxonomy-manifest.json')
|
manifest_path = pathlib.Path('tests/test-taxonomy-manifest.json')
|
||||||
@ -162,7 +165,7 @@ def category_for_target(target: str) -> str:
|
|||||||
return category_by_test_name[binary_name]
|
return category_by_test_name[binary_name]
|
||||||
parts = pathlib.PurePosixPath(target).parts
|
parts = pathlib.PurePosixPath(target).parts
|
||||||
if len(parts) >= 2 and parts[0] == 'tests':
|
if len(parts) >= 2 and parts[0] == 'tests':
|
||||||
return parts[1]
|
return normalize_category(parts[1])
|
||||||
if target.startswith('src/'):
|
if target.startswith('src/'):
|
||||||
return 'unit'
|
return 'unit'
|
||||||
return 'uncategorized'
|
return 'uncategorized'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user