Skip to content

Commit a1571e2

Browse files
authored
ci: extend detected code owners of each test (#971)
1 parent c064c61 commit a1571e2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/test_integration.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ jobs:
6565
python -m pip install --upgrade pip
6666
pip install --upgrade wheel setuptools build
6767
- name: Install
68-
run: pip install --disable-pip-version-check -e .[apm,tests]
68+
run: |
69+
pip install --disable-pip-version-check git+https://github.com/DataDog/dd-trace-py.git#egg=ddtrace
70+
pip install --disable-pip-version-check -e .[tests]
6971
- name: Test
7072
run: ./run-tests.sh
7173
shell: bash

tests/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ def pytest_bdd_before_scenario(request, feature, scenario):
113113

114114
codeowners = [f"@{tag[5:]}" for tag in scenario.tags | scenario.feature.tags if tag.startswith("team:")]
115115
if codeowners:
116+
try:
117+
default_value = span.get_tag("test.codeowners")
118+
default_codeowners = json.loads(default_value)
119+
codeowners.extend(default_codeowners)
120+
except Exception:
121+
pass
116122
span.set_tag("test.codeowners", json.dumps(codeowners))
117123

118124

0 commit comments

Comments
 (0)