diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f12eb76c..f7954b2ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,12 +21,16 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: 6.0.x - + - name: Restore dependencies run: dotnet restore ./backend/CcScan.Backend.sln - + - name: Build run: dotnet build ./backend/CcScan.Backend.sln -c Release --no-restore - name: Test - run: dotnet test ./backend/CcScan.Backend.sln --filter Category!=IntegrationTests -c Release --no-build --verbosity normal + run: + # Tests depend on docker-compose being available due to this issue https://github.com/mariotoffia/FluentDocker/issues/312. + # The soft linking should be remove when a fix is released. + ln -s /usr/libexec/docker/cli-plugins/docker-compose /usr/local/bin/docker-compose + dotnet test ./backend/CcScan.Backend.sln --filter Category!=IntegrationTests -c Release --no-build --verbosity normal diff --git a/backend/Tests/TestUtilities/DatabaseFixture.cs b/backend/Tests/TestUtilities/DatabaseFixture.cs index 9ace61304..0403e4212 100644 --- a/backend/Tests/TestUtilities/DatabaseFixture.cs +++ b/backend/Tests/TestUtilities/DatabaseFixture.cs @@ -3,6 +3,7 @@ using Application.Api.GraphQL.EfCore; using Application.Database; using Dapper; +using Ductus.FluentDocker.Model.Compose; using Ductus.FluentDocker.Builders; using Ductus.FluentDocker.Services; using Microsoft.EntityFrameworkCore; @@ -32,6 +33,7 @@ public DatabaseFixture() _service = new Builder() .UseContainer() .UseCompose() + .AssumeComposeVersion(ComposeVersion.V2) .FromFile(file) .RemoveOrphans() .WaitForPort("timescaledb-test", "5432/tcp", 30_000)