diff --git a/.fallout/build.schema.json b/.fallout/build.schema.json index dcfe64d..472ce39 100644 --- a/.fallout/build.schema.json +++ b/.fallout/build.schema.json @@ -93,6 +93,13 @@ "Verbosity": { "description": "Logging verbosity during build execution. Default is 'Normal'", "$ref": "#/definitions/Verbosity" + }, + "BuildProjectFile": { + "type": [ + "null", + "string" + ], + "description": "Path to the build project (.csproj) relative to the repository root. Defaults to 'build/_build.csproj' when unset. Read by the Fallout global tool's in-tool runner." } } } diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8b88069..2c007bb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,15 +29,21 @@ jobs: name: ubuntu-latest runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: fetch-depth: 0 - name: 'Cache: .fallout/temp, ~/.nuget/packages' - uses: actions/cache@v4 + uses: actions/cache@v6 with: path: | .fallout/temp ~/.nuget/packages key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }} + - name: 'Setup: .NET SDK' + uses: actions/setup-dotnet@v6 + with: + global-json-file: global.json + - name: 'Restore: dotnet tools' + run: dotnet tool restore - name: 'Run: Test' - run: ./build.cmd Test + run: dotnet fallout Test diff --git a/Directory.Packages.props b/Directory.Packages.props index 2bdeaa3..2eb42a0 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -9,17 +9,17 @@ - - + + - + - + @@ -28,42 +28,42 @@ - - - - - - + + + + + + - + - - - + + + - + - - + + - + - + - + diff --git a/README.md b/README.md index 168ffc5..c088004 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,13 @@ Built on .NET 10, Postgres, Wolverine and .NET Aspire. ## Prerequisites - **.NET 10 SDK** (`10.0.100+`, see `global.json`) -- **.NET Aspire workload** — `dotnet workload install aspire` -- **Docker** — Aspire provisions the Postgres container +- **Docker** — Aspire provisions the Postgres container, and the repository tests use Testcontainers - **ffmpeg** on PATH — `brew install ffmpeg` (used to remux HLS streams; the Downloader image bundles it) +> No Aspire *workload* install is needed. Aspire 13 comes in via the `Aspire.AppHost.Sdk` reference in +> `Krautwatch.AppHost.csproj` plus NuGet packages — the old `dotnet workload install aspire` step is +> legacy and does not apply. + --- ## Running the fleet locally diff --git a/build/_build.csproj b/build/_build.csproj index 2bd51d3..ce2b63d 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -13,8 +13,8 @@ - - + + diff --git a/src/Presentation/AppHost/Krautwatch.AppHost.csproj b/src/Presentation/AppHost/Krautwatch.AppHost.csproj index 986f200..1701692 100644 --- a/src/Presentation/AppHost/Krautwatch.AppHost.csproj +++ b/src/Presentation/AppHost/Krautwatch.AppHost.csproj @@ -1,6 +1,9 @@ - + + Exe diff --git a/tests/Application.Tests/CrawlShowHandlerTests.cs b/tests/Application.Tests/CrawlShowHandlerTests.cs index 90bddd5..003789d 100644 --- a/tests/Application.Tests/CrawlShowHandlerTests.cs +++ b/tests/Application.Tests/CrawlShowHandlerTests.cs @@ -46,7 +46,7 @@ public async Task Handle_selects_crawler_by_provider_and_upserts_the_crawled_epi zdf.LastQuery.ShouldBe("heute-show"); otherProvider.LastQuery.ShouldBeNull(); // the ARD crawler must not be invoked await repo.Received(1).UpsertManyAsync( - Arg.Is>(e => e.Count() == 2), Arg.Any()); + Arg.Is>(e => e != null && e.Count() == 2), Arg.Any()); } [Fact] diff --git a/tests/Application.Tests/RefreshProxyListHandlerTests.cs b/tests/Application.Tests/RefreshProxyListHandlerTests.cs index 80e4370..5c2c3d7 100644 --- a/tests/Application.Tests/RefreshProxyListHandlerTests.cs +++ b/tests/Application.Tests/RefreshProxyListHandlerTests.cs @@ -25,7 +25,7 @@ public async Task Upserts_the_fetched_candidates() await new RefreshProxyListHandler(source, repo, NullLogger.Instance).HandleAsync(); await repo.Received(1).UpsertBatchAsync( - Arg.Is>(ps => ps.Count() == 2), Arg.Any()); + Arg.Is>(ps => ps != null && ps.Count() == 2), Arg.Any()); } [Fact] diff --git a/tests/Application.Tests/SabnzbdDownloadTests.cs b/tests/Application.Tests/SabnzbdDownloadTests.cs index 6de8fcd..a33611e 100644 --- a/tests/Application.Tests/SabnzbdDownloadTests.cs +++ b/tests/Application.Tests/SabnzbdDownloadTests.cs @@ -67,7 +67,7 @@ public async Task Creates_and_enqueues_a_job_for_a_known_token() var jobId = await new AddDownloadByTokenHandler(episodes, jobs, queue).HandleAsync("zdf:1"); jobId.ShouldNotBeNull(); - await jobs.Received(1).AddAsync(Arg.Is(j => j.EpisodeId == "zdf:1" && j.StreamUrl == "https://cdn/x.mp4"), Arg.Any()); + await jobs.Received(1).AddAsync(Arg.Is(j => j != null && j.EpisodeId == "zdf:1" && j.StreamUrl == "https://cdn/x.mp4"), Arg.Any()); await queue.Received(1).EnqueueAsync(jobId!.Value, "https://cdn/x.mp4", Arg.Any()); } @@ -82,7 +82,7 @@ public async Task Snapshots_the_episodes_geo_restriction_onto_the_job() await new AddDownloadByTokenHandler(episodes, jobs, queue).HandleAsync("kika:1"); - await jobs.Received(1).AddAsync(Arg.Is(j => j.GeoRestricted), Arg.Any()); + await jobs.Received(1).AddAsync(Arg.Is(j => j != null && j.GeoRestricted), Arg.Any()); } [Fact]