Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,11 @@ jobs:
CMD="coverage run --rcfile=${{ inputs.coverage_config_path }}"

if [[ -n '${{ inputs.django_settings_module }}' ]]; then
CMD="${CMD} -a manage.py test"
# No '-a' (append): it is incompatible with coverage parallel
# mode (concurrency=multiprocessing / parallel=true) used by
# projects that run the Django test suite with --parallel.
# A single coverage run does not need append anyway.
CMD="${CMD} manage.py test"
# manage manual tags
if [[ -n '${{ inputs.tags_for_manual_tests }}' ]]; then
for tag in ${{ inputs.tags_for_manual_tests }}; do
Expand Down Expand Up @@ -543,6 +547,18 @@ jobs:
env: ${{ secrets }}
shell: bash

- name: Combine coverage data
if: inputs.use_coverage && inputs.upload_coverage
run: |
# When coverage runs in parallel mode (concurrency=multiprocessing),
# each worker process writes its own .coverage.* file; merge them
# before reporting. No-op for projects not using parallel coverage.
if ls .coverage.* >/dev/null 2>&1; then
coverage combine
fi
working-directory: ${{ inputs.working_directory }}
shell: bash

- name: Create coverage output
if: inputs.use_coverage && inputs.upload_coverage
id: coverage-output
Expand Down
18 changes: 17 additions & 1 deletion workflows/_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,11 @@ jobs:
CMD="coverage run --rcfile=${{ inputs.coverage_config_path }}"

if [[ -n '${{ inputs.django_settings_module }}' ]]; then
CMD="${CMD} -a manage.py test"
# No '-a' (append): it is incompatible with coverage parallel
# mode (concurrency=multiprocessing / parallel=true) used by
# projects that run the Django test suite with --parallel.
# A single coverage run does not need append anyway.
CMD="${CMD} manage.py test"
# manage manual tags
if [[ -n '${{ inputs.tags_for_manual_tests }}' ]]; then
for tag in ${{ inputs.tags_for_manual_tests }}; do
Expand Down Expand Up @@ -543,6 +547,18 @@ jobs:
env: ${{ secrets }}
shell: bash

- name: Combine coverage data
if: inputs.use_coverage && inputs.upload_coverage
run: |
# When coverage runs in parallel mode (concurrency=multiprocessing),
# each worker process writes its own .coverage.* file; merge them
# before reporting. No-op for projects not using parallel coverage.
if ls .coverage.* >/dev/null 2>&1; then
coverage combine
fi
working-directory: ${{ inputs.working_directory }}
shell: bash

- name: Create coverage output
if: inputs.use_coverage && inputs.upload_coverage
id: coverage-output
Expand Down
Loading