Skip to content

Tests: Support Docker #1677

@swharden

Description

@swharden

Rendering in Linux is different than Windows when it comes to pixel alignment (#340) and fonts (#1649, #1310, #1079) and it is helpful to have an easy way to inspect images rendered using Linux.

ScottPlot tests work on my machine in Linux using WSL, but it seems more useful to run these tests in a Docker container

I am able to build the project in docker, but the NUnit3 tests fail to run:

System.IO.FileNotFoundException: 
  Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Culture=neutral, PublicKeyToken=null'. 
  The system cannot find the file specified.

FROM mcr.microsoft.com/dotnet/runtime:6.0

version: "2"
services:
scottplot-test:
build:
context: .
dockerfile: ./Dockerfile
volumes:
- ../../:/app
entrypoint: [ "/bin/sh", "-c" ]
command:
- |
cd /app/src/tests/
dotnet add package Microsoft.Bcl.AsyncInterfaces
dotnet restore
dotnet build --no-restore
dotnet test --no-restore --diag logs.txt
cat logs.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions