Skip to content

Commit

Permalink
Fix CI issue caused by docker-compose not being available
Browse files Browse the repository at this point in the history
  • Loading branch information
limemloh committed Sep 23, 2024
1 parent a20ed16 commit 1d68a2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions backend/Tests/TestUtilities/DatabaseFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -32,6 +33,7 @@ public DatabaseFixture()
_service = new Builder()
.UseContainer()
.UseCompose()
.AssumeComposeVersion(ComposeVersion.V2)
.FromFile(file)
.RemoveOrphans()
.WaitForPort("timescaledb-test", "5432/tcp", 30_000)
Expand Down

0 comments on commit 1d68a2d

Please sign in to comment.