Skip to content
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
62 changes: 34 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,17 @@ jobs:
Linux-nuget-
- name: Build
run: dotnet build --configuration Release
- name: Enable Automated Test Artifact Uploads
uses: actions/github-script@v9
with:
script: |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN']);
core.exportVariable('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL']);
- name: Core Tests
run: |
dotnet test tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj --filter "Fragile!=CI" -c Release --logger GitHubActions --no-restore --no-build --verbosity d
dotnet test tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj -c Release --no-restore --logger GitHubActions --no-build --verbosity d
dotnet test tests/Paramore.Brighter.Transforms.Adaptors.Tests/Paramore.Brighter.Transforms.Adaptors.Tests.csproj -c Release --no-restore --logger GitHubActions --no-build --verbosity d
dotnet test --project tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]" -c Release --no-restore --no-build --verbosity d
dotnet test --project tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj -c Release --no-restore --no-build --verbosity d
dotnet test --project tests/Paramore.Brighter.Transforms.Adaptors.Tests/Paramore.Brighter.Transforms.Adaptors.Tests.csproj -c Release --no-restore --no-build --verbosity d

- name: Upload packages as artifacts
uses: actions/upload-artifact@v7
Expand Down Expand Up @@ -104,7 +110,7 @@ jobs:
- name: Install dependencies
run: dotnet restore
- name: In Memory Transport Tests
run: dotnet test ./tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
run: dotnet test --project ./tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]" --configuration Release --blame -v n

hangfire:
runs-on: ubuntu-latest
Expand All @@ -122,7 +128,7 @@ jobs:
- name: Install dependencies
run: dotnet restore
- name: Hangfire Tests
run: dotnet test ./tests/Paramore.Brighter.Hangfire.Tests/Paramore.Brighter.Hangfire.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
run: dotnet test --project ./tests/Paramore.Brighter.Hangfire.Tests/Paramore.Brighter.Hangfire.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]" --configuration Release --blame -v n

quartz:
runs-on: ubuntu-latest
Expand All @@ -140,7 +146,7 @@ jobs:
- name: Install dependencies
run: dotnet restore
- name: Quartz Tests
run: dotnet test ./tests/Paramore.Brighter.Quartz.Tests/Paramore.Brighter.Quartz.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
run: dotnet test --project ./tests/Paramore.Brighter.Quartz.Tests/Paramore.Brighter.Quartz.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]" --configuration Release --blame -v n

tickerq:
runs-on: ubuntu-latest
Expand All @@ -158,7 +164,7 @@ jobs:
- name: Install dependencies
run: dotnet restore
- name: TickerQ Tests
run: dotnet test ./tests/Paramore.Brighter.TickerQ.Tests/Paramore.Brighter.TickerQ.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
run: dotnet test --project ./tests/Paramore.Brighter.TickerQ.Tests/Paramore.Brighter.TickerQ.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]" --configuration Release --blame -v n

redis-ci:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -190,7 +196,7 @@ jobs:
- name: Install dependencies
run: dotnet restore
- name: Redis Transport Tests
run: dotnet test ./tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
run: dotnet test --project ./tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]" --configuration Release --blame -v n

mqtt-ci:
runs-on: ubuntu-latest
Expand All @@ -215,7 +221,7 @@ jobs:
- name: Install dependencies
run: dotnet restore
- name: MQTT Transport Tests
run: dotnet test ./tests/Paramore.Brighter.MQTT.Tests/Paramore.Brighter.MQTT.Tests.csproj --filter "Category=MQTT&Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
run: dotnet test --project ./tests/Paramore.Brighter.MQTT.Tests/Paramore.Brighter.MQTT.Tests.csproj --treenode-filter "/*/*/*/*[Category=MQTT]&[Fragile!=CI]" --configuration Release --blame -v n

rabbitmq-ci:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -245,9 +251,9 @@ jobs:
- name: Install dependencies
run: dotnet restore
- name: RMQ Async Transport Tests
run: dotnet test ./tests/Paramore.Brighter.RMQ.Async.Tests/Paramore.Brighter.RMQ.Async.Tests.csproj --filter "Fragile!=CI&Requires!=Docker-mTLS" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
run: dotnet test --project ./tests/Paramore.Brighter.RMQ.Async.Tests/Paramore.Brighter.RMQ.Async.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]&[Requires!=Docker-mTLS]" --configuration Release --blame -v n
- name: RMQ Sync Transport Tests
run: dotnet test ./tests/Paramore.Brighter.RMQ.Sync.Tests/Paramore.Brighter.RMQ.Sync.Tests.csproj --filter "Fragile!=CI&Requires!=Docker-mTLS" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
run: dotnet test --project ./tests/Paramore.Brighter.RMQ.Sync.Tests/Paramore.Brighter.RMQ.Sync.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]&[Requires!=Docker-mTLS]" --configuration Release --blame -v n

kafka-ci:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -322,7 +328,7 @@ jobs:
- name: Install dependencies
run: dotnet restore
- name: Kafka Transport Tests
run: dotnet test ./tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj --filter "Category=Kafka&Category!=Confluent&Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
run: dotnet test --project ./tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj --treenode-filter "/*/*/*/*[Category=Kafka]&[Category!=Confluent]&[Fragile!=CI]" --configuration Release --blame -v n

postgres-ci:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -353,7 +359,7 @@ jobs:
- name: Install dependencies
run: dotnet restore
- name: Postgres Tests
run: dotnet test ./tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
run: dotnet test --project ./tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]" --configuration Release --blame -v n

sqlserver-ci:
runs-on: ubuntu-latest
Expand All @@ -379,7 +385,7 @@ jobs:
- name: Install dependencies
run: dotnet restore
- name: MSSQL Tests
run: dotnet test ./tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
run: dotnet test --project ./tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]" --configuration Release --blame -v n

mysql-ci:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -414,7 +420,7 @@ jobs:
sleep 1
done
- name: MySQL Tests
run: dotnet test ./tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
run: dotnet test --project ./tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]" --configuration Release --blame -v n

dynamo-ci:
runs-on: ubuntu-latest
Expand All @@ -439,8 +445,8 @@ jobs:
run: dotnet restore
- name: DynamoDB Tests
run: |
dotnet test ./tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
dotnet test ./tests/Paramore.Brighter.DynamoDB.V4.Tests/Paramore.Brighter.DynamoDB.V4.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
dotnet test --project ./tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]" --configuration Release --blame -v n
dotnet test --project ./tests/Paramore.Brighter.DynamoDB.V4.Tests/Paramore.Brighter.DynamoDB.V4.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]" --configuration Release --blame -v n

localstack-ci:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -477,8 +483,8 @@ jobs:
Linux-nuget-
- name: AWS Tests
run: |
dotnet test ./tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
dotnet test ./tests/Paramore.Brighter.AWS.V4.Tests/Paramore.Brighter.AWS.V4.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
dotnet test --project ./tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]" --configuration Release --blame -v n
dotnet test --project ./tests/Paramore.Brighter.AWS.V4.Tests/Paramore.Brighter.AWS.V4.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]" --configuration Release --blame -v n

aws-ci:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -511,8 +517,8 @@ jobs:
aws-region: eu-west-1
- name: AWS SNS, SQS and S3 Tests
run: |
dotnet test ./tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
dotnet test ./tests/Paramore.Brighter.AWS.V4.Tests/Paramore.Brighter.AWS.V4.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
dotnet test --project ./tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]" --configuration Release --blame -v n
dotnet test --project ./tests/Paramore.Brighter.AWS.V4.Tests/Paramore.Brighter.AWS.V4.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]" --configuration Release --blame -v n
- name: Cleanup orphaned test resources
if: always()
run: |
Expand Down Expand Up @@ -551,8 +557,8 @@ jobs:
aws-region: eu-west-1
- name: Scheduler Tests
run: |
dotnet test ./tests/Paramore.Brighter.AWSScheduler.Tests/Paramore.Brighter.AWSScheduler.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
dotnet test ./tests/Paramore.Brighter.AWSScheduler.V4.Tests/Paramore.Brighter.AWSScheduler.V4.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
dotnet test --project ./tests/Paramore.Brighter.AWSScheduler.Tests/Paramore.Brighter.AWSScheduler.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]" --configuration Release --blame -v n
dotnet test --project ./tests/Paramore.Brighter.AWSScheduler.V4.Tests/Paramore.Brighter.AWSScheduler.V4.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]" --configuration Release --blame -v n
- name: Cleanup orphaned test resources
if: always()
run: |
Expand All @@ -576,7 +582,7 @@ jobs:
- name: Install dependencies
run: dotnet restore
- name: Sqlite Tests
run: dotnet test ./tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
run: dotnet test --project ./tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]" --configuration Release --blame -v n

azure-ci:
runs-on: ubuntu-latest
Expand All @@ -598,7 +604,7 @@ jobs:
- name: Install dependencies
run: dotnet restore
- name: Azure Tests
run: dotnet test ./tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
run: dotnet test --project ./tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]" --configuration Release --blame -v n

mongodb-ci:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -630,7 +636,7 @@ jobs:
- name: Install dependencies
run: dotnet restore
- name: MongoDB Tests
run: dotnet test ./tests/Paramore.Brighter.MongoDb.Tests/Paramore.Brighter.MongoDb.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
run: dotnet test --project ./tests/Paramore.Brighter.MongoDb.Tests/Paramore.Brighter.MongoDb.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]" --configuration Release --blame -v n

gcp-ci:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -667,7 +673,7 @@ jobs:
run: dotnet restore

- name: GCP Tests
run: dotnet test ./tests/Paramore.Brighter.Gcp.Tests/Paramore.Brighter.Gcp.Tests.csproj --filter "Category!=Spanner&Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
run: dotnet test --project ./tests/Paramore.Brighter.Gcp.Tests/Paramore.Brighter.Gcp.Tests.csproj --treenode-filter "/*/*/*/*[Category!=Spanner]&[Fragile!=CI]" --configuration Release --blame -v n

# TODO: Rafael Andrade is working on how to run RocketMQ on GHA
# rocketmq-ci:
Expand Down Expand Up @@ -731,4 +737,4 @@ jobs:
# run: dotnet restore
#
# - name: RocketMQ Tests
# run: dotnet test ./tests/Paramore.Brighter.RocketMQ.Tests/Paramore.Brighter.RocketMQ.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --blame -v n
# run: dotnet test --project ./tests/Paramore.Brighter.RocketMQ.Tests/Paramore.Brighter.RocketMQ.Tests.csproj --treenode-filter "/*/*/*/*[Fragile!=CI]" --configuration Release --blame -v n
12 changes: 3 additions & 9 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<PackageVersion Include="Microsoft.Extensions.Options" Version="10.0.5" />
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="10.4.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
<PackageVersion Include="Microsoft.Testing.Extensions.HangDump" Version="2.2.1" />
<PackageVersion Include="MongoDB.Driver" Version="3.7.1" />
<PackageVersion Include="MQTTnet" Version="4.3.7.1207" />
<PackageVersion Include="MySqlConnector" Version="2.5.0" />
Expand Down Expand Up @@ -140,15 +141,8 @@
<PackageVersion Include="System.Text.Json" Version="10.0.5" />
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageVersion Include="System.Threading.Channels" Version="10.0.5" />
<PackageVersion Include="TUnit" Version="0.67.10" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="TUnit" Version="1.33.0" />
<PackageVersion Include="FakeItEasy" Version="9.0.1" />
<PackageVersion Include="xunit.v3" Version="3.1.0" />
<PackageVersion Include="xunit.v3.runner.msbuild" Version="3.1.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.22" />
Expand Down Expand Up @@ -194,4 +188,4 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</GlobalPackageReference>
</ItemGroup>
</Project>
</Project>
5 changes: 5 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"test": {
"runner": "Microsoft.Testing.Platform"
}
}
4 changes: 2 additions & 2 deletions samples/TaskQueue/AWSTaskQueue/GreetingsSender/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static async Task Main(string[] args)
}
});

var producerRegistry = new SnsProducerRegistryFactory(
var producerRegistry = await new SnsProducerRegistryFactory(
awsConnection,
[
new SnsPublication<GreetingEvent>
Expand All @@ -79,7 +79,7 @@ static async Task Main(string[] args)
}
}
]
).Create();
).CreateAsync();

serviceCollection
.AddBrighter()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,12 +435,12 @@ public async ValueTask DisposeAsync()
if (_deadLetterProducer?.IsValueCreated == true && _deadLetterProducer.Value is IAsyncDisposable deadLetterAsync)
await deadLetterAsync.DisposeAsync();
else if (_deadLetterProducer?.IsValueCreated == true)
_deadLetterProducer.Value?.Dispose();
await _deadLetterProducer.Value!.DisposeAsync();

if (_invalidMessageProducer?.IsValueCreated == true && _invalidMessageProducer.Value is IAsyncDisposable invalidAsync)
await invalidAsync.DisposeAsync();
else if (_invalidMessageProducer?.IsValueCreated == true)
_invalidMessageProducer.Value?.Dispose();
await _invalidMessageProducer.Value!.DisposeAsync();

GC.SuppressFinalize(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,12 +442,12 @@ public async ValueTask DisposeAsync()
if (_deadLetterProducer?.IsValueCreated == true && _deadLetterProducer.Value is IAsyncDisposable deadLetterAsync)
await deadLetterAsync.DisposeAsync();
else if (_deadLetterProducer?.IsValueCreated == true)
_deadLetterProducer.Value?.Dispose();
await _deadLetterProducer.Value!.DisposeAsync();

if (_invalidMessageProducer?.IsValueCreated == true && _invalidMessageProducer.Value is IAsyncDisposable invalidAsync)
await invalidAsync.DisposeAsync();
else if (_invalidMessageProducer?.IsValueCreated == true)
_invalidMessageProducer.Value?.Dispose();
await _invalidMessageProducer.Value!.DisposeAsync();

GC.SuppressFinalize(this);
}
Expand Down
Loading
Loading