Skip to content
Merged
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
1 change: 1 addition & 0 deletions ddev/changelog.d/24099.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Skip code coverage gate validation for extras repos, which do not enforce a required per-integration coverage threshold.
3 changes: 2 additions & 1 deletion ddev/src/ddev/cli/validate/ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def ci(app: Application, sync: bool):

is_core = app.repo.name == 'core'
is_marketplace = app.repo.name == 'marketplace'
is_extras = app.repo.name == 'extras'

# For non-core repos, extract the workflow reference from existing workflow files
# This allows using either @master or @<commit-sha>
Expand Down Expand Up @@ -229,7 +230,7 @@ def ci(app: Application, sync: bool):
if repo_choice not in valid_repos:
app.abort(f'Unknown repository `{repo_choice}`')

if is_marketplace:
if is_marketplace or is_extras:
validation_tracker.success()
validation_tracker.display()
return
Expand Down
17 changes: 17 additions & 0 deletions ddev/tests/cli/validate/test_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,23 @@ def test_code_coverage_file_missing(ddev, repository, helpers):
assert "Unable to find the code coverage config file" in helpers.remove_trailing_spaces(result.output)


def test_code_coverage_skipped_for_extras(ddev, repository, helpers, config_file):
config_file.model.repos['extras'] = str(repository.path)
config_file.model.repo = 'extras'
config_file.save()

# Remove the coverage file entirely — extras should not care
coverage_file = repository.path / 'code-coverage.datadog.yml'
if coverage_file.exists():
coverage_file.unlink()

result = ddev('validate', 'ci', '--sync')
assert result.exit_code == 0, result.output

result = ddev('validate', 'ci')
assert result.exit_code == 0, result.output


@pytest.mark.parametrize(
'repo_name',
[
Expand Down
Loading