Skip to content

Commit

Permalink
Use Microsoft.CodeAnalysis.PublicApiAnalyzers
Browse files Browse the repository at this point in the history
Reference: #1269

* Use the same API analysis tool that is used in the RabbitMQ.Stream.Client library.
* Remove existing APIApproval tests. Replaced by PublicApiAnalyzers.
* Add retries when connection can't be open due to a `SocketException`.
* Change Windows GitHub actions runner to windows-2019. It should be faster and may not have that socket exception
* Add connection retries for SocketException to SSL tests. Uncovered with windows 2019.
  • Loading branch information
lukebakken committed Dec 19, 2023
1 parent 3794b4c commit 1fa2325
Show file tree
Hide file tree
Showing 19 changed files with 1,223 additions and 1,399 deletions.
2 changes: 1 addition & 1 deletion .ci/windows/versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"erlang": "26.1.2",
"erlang": "26.2.1",
"rabbitmq": "3.12.10"
}
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,17 @@ csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false

# Analyzers
dotnet_code_quality.api_surface = public
dotnet_code_quality.ca1802.api_surface = private, internal

dotnet_public_api_analyzer.require_api_files = true

dotnet_diagnostic.RS0026.severity = none
dotnet_diagnostic.RS0027.severity = none
dotnet_diagnostic.RS0036.severity = none
dotnet_diagnostic.RS0041.severity = none
dotnet_diagnostic.RS0051.severity = error

# C++ Files
[*.{cpp,h,in}]
curly_bracket_next_line = true
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ on:

jobs:
build-win32:
name: build, unit test on windows-latest
runs-on: windows-latest
runs-on: windows-2019
# https://github.com/NuGet/Home/issues/11548
env:
NUGET_CERT_REVOCATION_MODE: offline
Expand Down Expand Up @@ -43,9 +42,8 @@ jobs:
projects/Test/SequentialIntegration/bin
projects/RabbitMQ.*/bin
integration-win32:
name: integration test on windows-latest
needs: build-win32
runs-on: windows-latest
runs-on: windows-2019
# https://github.com/NuGet/Home/issues/11548
env:
NUGET_CERT_REVOCATION_MODE: offline
Expand Down Expand Up @@ -80,9 +78,8 @@ jobs:
name: rabbitmq-logs-integration-win32
path: ~/AppData/Roaming/RabbitMQ/log/
sequential-integration-win32:
name: sequential integration test on windows-latest
needs: build-win32
runs-on: windows-latest
runs-on: windows-2019
# https://github.com/NuGet/Home/issues/11548
env:
NUGET_CERT_REVOCATION_MODE: offline
Expand Down Expand Up @@ -116,7 +113,6 @@ jobs:
path: ~/AppData/Roaming/RabbitMQ/log/

build-ubuntu:
name: build, unit test on ubuntu-latest
runs-on: ubuntu-latest
steps:
- name: Clone repository
Expand Down Expand Up @@ -155,7 +151,6 @@ jobs:
projects/Test/SequentialIntegration/bin
projects/RabbitMQ.*/bin
integration-ubuntu:
name: integration test on ubuntu-latest
needs: build-ubuntu
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -195,7 +190,6 @@ jobs:
name: rabbitmq-logs-integration-ubuntu
path: ${{ github.workspace }}/.ci/ubuntu/log/
sequential-integration-ubuntu:
name: sequential integration test on ubuntu-latest
needs: build-ubuntu
runs-on: ubuntu-latest
steps:
Expand Down
Empty file.
36 changes: 36 additions & 0 deletions projects/RabbitMQ.Client.OAuth2/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
RabbitMQ.Client.OAuth2.IOAuth2Client
RabbitMQ.Client.OAuth2.IOAuth2Client.RefreshToken(RabbitMQ.Client.OAuth2.IToken token) -> RabbitMQ.Client.OAuth2.IToken
RabbitMQ.Client.OAuth2.IOAuth2Client.RequestToken() -> RabbitMQ.Client.OAuth2.IToken
RabbitMQ.Client.OAuth2.IToken
RabbitMQ.Client.OAuth2.IToken.AccessToken.get -> string
RabbitMQ.Client.OAuth2.IToken.ExpiresIn.get -> System.TimeSpan
RabbitMQ.Client.OAuth2.IToken.hasExpired.get -> bool
RabbitMQ.Client.OAuth2.IToken.RefreshToken.get -> string
RabbitMQ.Client.OAuth2.JsonToken
RabbitMQ.Client.OAuth2.JsonToken.access_token.get -> string
RabbitMQ.Client.OAuth2.JsonToken.access_token.set -> void
RabbitMQ.Client.OAuth2.JsonToken.expires_in.get -> long
RabbitMQ.Client.OAuth2.JsonToken.expires_in.set -> void
RabbitMQ.Client.OAuth2.JsonToken.JsonToken() -> void
RabbitMQ.Client.OAuth2.JsonToken.JsonToken(string access_token, string refresh_token, long expires_in) -> void
RabbitMQ.Client.OAuth2.JsonToken.JsonToken(string access_token, string refresh_token, System.TimeSpan expires_in_span) -> void
RabbitMQ.Client.OAuth2.JsonToken.refresh_token.get -> string
RabbitMQ.Client.OAuth2.JsonToken.refresh_token.set -> void
RabbitMQ.Client.OAuth2.OAuth2ClientBuilder
RabbitMQ.Client.OAuth2.OAuth2ClientBuilder.AddRequestParameter(string param, string paramValue) -> RabbitMQ.Client.OAuth2.OAuth2ClientBuilder
RabbitMQ.Client.OAuth2.OAuth2ClientBuilder.Build() -> RabbitMQ.Client.OAuth2.IOAuth2Client
RabbitMQ.Client.OAuth2.OAuth2ClientBuilder.OAuth2ClientBuilder(string clientId, string clientSecret, System.Uri tokenEndpoint) -> void
RabbitMQ.Client.OAuth2.OAuth2ClientBuilder.SetHttpClientHandler(System.Net.Http.HttpClientHandler handler) -> RabbitMQ.Client.OAuth2.OAuth2ClientBuilder
RabbitMQ.Client.OAuth2.OAuth2ClientBuilder.SetScope(string scope) -> RabbitMQ.Client.OAuth2.OAuth2ClientBuilder
RabbitMQ.Client.OAuth2.OAuth2ClientCredentialsProvider
RabbitMQ.Client.OAuth2.OAuth2ClientCredentialsProvider.Name.get -> string
RabbitMQ.Client.OAuth2.OAuth2ClientCredentialsProvider.OAuth2ClientCredentialsProvider(string name, RabbitMQ.Client.OAuth2.IOAuth2Client oAuth2Client) -> void
RabbitMQ.Client.OAuth2.OAuth2ClientCredentialsProvider.Password.get -> string
RabbitMQ.Client.OAuth2.OAuth2ClientCredentialsProvider.Refresh() -> void
RabbitMQ.Client.OAuth2.OAuth2ClientCredentialsProvider.UserName.get -> string
RabbitMQ.Client.OAuth2.OAuth2ClientCredentialsProvider.ValidUntil.get -> System.TimeSpan?
RabbitMQ.Client.OAuth2.Token
RabbitMQ.Client.OAuth2.Token.AccessToken.get -> string
RabbitMQ.Client.OAuth2.Token.ExpiresIn.get -> System.TimeSpan
RabbitMQ.Client.OAuth2.Token.RefreshToken.get -> string
RabbitMQ.Client.OAuth2.Token.Token(RabbitMQ.Client.OAuth2.JsonToken json) -> void
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="MinVer" Version="4.3.0" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
Expand Down
1 change: 1 addition & 0 deletions projects/RabbitMQ.Client/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Loading

0 comments on commit 1fa2325

Please sign in to comment.