Skip to content

ci: Auto-Verify API changes in Pull Requests #5157

@Flash0ver

Description

@Flash0ver

Summary

Changes to the public API surface area often cause ping-pings with the API-Verify/Snapshot tests in CI.

Remarks

In particular, developing on non-Windows, we often run into the problem that the .NET Framework API changes are missing and therefore failing CI tests.

Similar to the Auto-Format workflow,
we want to Auto-Accept all API-Verify changes on all TFMs.

We could expand this to not just API changes, but all Snapshot/Verify tests.

See scripts/accept-verifier-changes.ps1.
See .github/workflows/format-code.yml.

Alternative

Instead of comparing and verifying the API shape at run-time (test-time),
we could use the Diagnostic Analyzers of Microsoft.CodeAnalysis.PublicApiAnalyzers instead;
see https://github.com/dotnet/roslyn/blob/main/src/RoslynAnalyzers/PublicApiAnalyzers/PublicApiAnalyzers.Help.md

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions