Skip to content

Commit 98aa382

Browse files
committed
Split test execution to run serial tests separately
Telemetry e2e tests must run serially due to shared host-level telemetry client across pytest-xdist workers. Running with -n auto causes test isolation issues where futures aren't properly captured. Changes: - Run parallel tests with -m 'not serial' -n auto - Run serial tests with -m 'serial' without parallelization - Use --cov-append for serial tests to combine coverage - Mark telemetry e2e tests with @pytest.mark.serial - Update test expectations for default telemetry behavior - Add feature flags cache cleanup in test teardown
1 parent e898be6 commit 98aa382

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.github/workflows/code-coverage.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,32 @@ jobs:
6161
- name: Install library
6262
run: poetry install --no-interaction --all-extras
6363
#----------------------------------------------
64-
# run all tests with coverage
64+
# run parallel tests with coverage
6565
#----------------------------------------------
66-
- name: Run all tests with coverage
66+
- name: Run parallel tests with coverage
6767
continue-on-error: false
6868
run: |
6969
poetry run pytest tests/unit tests/e2e \
70+
-m "not serial" \
7071
-n auto \
7172
--cov=src \
7273
--cov-report=xml \
7374
--cov-report=term \
7475
-v
76+
77+
#----------------------------------------------
78+
# run serial tests with coverage
79+
#----------------------------------------------
80+
- name: Run serial tests with coverage
81+
continue-on-error: false
82+
run: |
83+
poetry run pytest tests/e2e \
84+
-m "serial" \
85+
--cov=src \
86+
--cov-append \
87+
--cov-report=xml \
88+
--cov-report=term \
89+
-v
7590
7691
#----------------------------------------------
7792
# check for coverage override

0 commit comments

Comments
 (0)