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
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
dotnet: ${{ steps.classify.outputs.dotnet }}
aep: ${{ steps.classify.outputs.aep }}
container: ${{ steps.classify.outputs.container }}
postgresql: ${{ steps.classify.outputs.postgresql }}
steps:
- name: Check out repository
uses: actions/checkout@v7
Expand Down Expand Up @@ -62,15 +63,20 @@ jobs:
$container = $runEverything -or @($changedFiles | Where-Object {
$_ -match '^(src/|aep/src/|deploy/|Dockerfile$|\.dockerignore$|global\.json$|Agentstration\.slnx$|Directory\.(Build|Packages)\.(props|targets)$|\.github/workflows/ci\.yml$)'
}).Count -gt 0
$postgresql = $runEverything -or @($changedFiles | Where-Object {
$_ -match '^(src/Agentstration\.(Flow|Management|Runtime|Work)\.Storage\.(Abstractions|PostgreSql)/|src/Agentstration\.Infrastructure/|src/Agentstration\.Security\.AspNetCoreIdentity(\.PostgreSql)?/|src/Agentstration\.Web/(Program\.cs|appsettings.*\.json)$|tests/Agentstration\.Web\.Tests/(PostgreSqlStorageProfileTests|StorageConcurrencyBenchmarkTests|StorageOptionsTests|QuartzHostLifecycleTests)\.cs$|docker-compose\.postgresql\.yml$|\.env\.postgresql\.example$|global\.json$|Agentstration\.slnx$|Directory\.(Build|Packages)\.(props|targets)$|\.github/workflows/ci\.yml$)'
}).Count -gt 0

"dotnet=$($dotnet.ToString().ToLowerInvariant())" >> $env:GITHUB_OUTPUT
"aep=$($aep.ToString().ToLowerInvariant())" >> $env:GITHUB_OUTPUT
"container=$($container.ToString().ToLowerInvariant())" >> $env:GITHUB_OUTPUT
"postgresql=$($postgresql.ToString().ToLowerInvariant())" >> $env:GITHUB_OUTPUT

Write-Host "Changed files: $($changedFiles.Count)"
Write-Host "Run .NET validation: $dotnet"
Write-Host "Run complete AEP validation: $aep"
Write-Host "Build container: $container"
Write-Host "Run PostgreSQL validation: $postgresql"

windows-host-lifecycle:
name: windows-host-lifecycle
Expand Down Expand Up @@ -152,6 +158,8 @@ jobs:
postgresql-storage:
name: postgresql-storage
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.postgresql == 'true'
timeout-minutes: 20
services:
postgres:
Expand All @@ -169,6 +177,8 @@ jobs:
--health-retries 12
env:
AGENTSTRATION_TEST_POSTGRES: Host=127.0.0.1;Port=5432;Database=agentstration;Username=agentstration;Password=agentstration-ci-only
Agentstration__Storage__Provider: PostgreSql
ConnectionStrings__Agentstration: Host=127.0.0.1;Port=5432;Database=agentstration;Username=agentstration;Password=agentstration-ci-only
steps:
- name: Check out repository
uses: actions/checkout@v7
Expand All @@ -181,7 +191,9 @@ jobs:
- name: Build PostgreSQL integration tests
run: dotnet build tests/Agentstration.Web.Tests/Agentstration.Web.Tests.csproj --configuration Release --no-restore
- name: Run PostgreSQL migration and restart test
run: dotnet tests/Agentstration.Web.Tests/bin/Release/net10.0/Agentstration.Web.Tests.dll --filter "Name=EmptyDatabaseMigratesAndRemainsReadyAfterRestart" --progress off
run: dotnet tests/Agentstration.Web.Tests/bin/Release/net10.0/Agentstration.Web.Tests.dll --filter "TestCategory=PostgreSql" --progress off
- name: Run Web tests with PostgreSQL storage
run: dotnet tests/Agentstration.Web.Tests/bin/Release/net10.0/Agentstration.Web.Tests.dll --filter "TestCategory!=PostgreSql&TestCategory!=Sqlite&TestCategory!=Benchmark" --progress off
- name: Run PostgreSQL storage concurrency benchmark
env:
AGENTSTRATION_STORAGE_BENCHMARK_PROVIDER: PostgreSql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace Agentstration.Web.Tests;
public sealed class PostgreSqlStorageProfileTests
{
[TestMethod]
[TestCategory("PostgreSql")]
public async Task EmptyDatabaseMigratesAndRemainsReadyAfterRestart()
{
var connectionString = Environment.GetEnvironmentVariable("AGENTSTRATION_TEST_POSTGRES");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public async Task DefaultTestingDataDirectoryIsRemovedAfterHostShutdown()
}

[TestMethod]
[TestCategory("Sqlite")]
public async Task SchedulerDatabaseIsReleasedAfterEveryHostShutdown()
{
for (var iteration = 0; iteration < 3; iteration++)
Expand Down
Loading