37 lines
1.4 KiB
Text
37 lines
1.4 KiB
Text
FROM mono:6.12
|
|
|
|
WORKDIR /build
|
|
|
|
# Sync Mozilla root certs into Mono trust store — required for NuGet HTTPS on Buster
|
|
RUN cert-sync /etc/ssl/certs/ca-certificates.crt
|
|
|
|
# Copy solution + projects first for layer caching
|
|
COPY FanucProgramManager.csproj ./
|
|
COPY packages.config ./
|
|
COPY FanucProgramManager.Tests/FanucProgramManager.Tests.csproj ./FanucProgramManager.Tests/
|
|
COPY FanucProgramManager.Tests/packages.config ./FanucProgramManager.Tests/
|
|
COPY FanucProgramManager.sln ./
|
|
|
|
# Restore all packages (sln now includes test project)
|
|
RUN nuget restore FanucProgramManager.sln -NonInteractive
|
|
# Explicit fallback: restore test packages.config directly to same packages dir
|
|
RUN nuget restore FanucProgramManager.Tests/packages.config \
|
|
-OutputDirectory packages -NonInteractive
|
|
# Grab NUnit console runner
|
|
RUN nuget install NUnit.ConsoleRunner -Version 3.16.3 -OutputDirectory packages -NonInteractive
|
|
|
|
# Copy source
|
|
COPY . .
|
|
|
|
# Make libs dir explicit (native Win32 DLLs — needed by csproj Content entries, not executed on Linux)
|
|
RUN ls Cnc/Fanuc/libs/ || true
|
|
|
|
# Build test project (Debug)
|
|
RUN msbuild FanucProgramManager.Tests/FanucProgramManager.Tests.csproj \
|
|
/p:Configuration=Debug /p:Platform=AnyCPU \
|
|
/v:minimal /nologo
|
|
|
|
# Run tests — skip Fanuc FOCAS tests (marked [Ignore] — need fwlib32.dll)
|
|
CMD mono packages/NUnit.ConsoleRunner.3.16.3/tools/nunit3-console.exe \
|
|
FanucProgramManager.Tests/bin/Debug/FanucProgramManager.Tests.dll \
|
|
--labels=All
|