CompSciLauren / stardew-valley-daily-screenshot-mod

:honeybee: A Stardew Valley mod that automatically takes a screenshot of your entire farm at the start of each day
https://www.nexusmods.com/stardewvalley/mods/4779
MIT License
10 stars 9 forks source link

Add initial test #74

Closed dv297 closed 9 months ago

dv297 commented 9 months ago

This adds some initial unit tests that can be run using dotnet test from the CLI.

For others: My original intention was to write a Dockerfile that contained the dotnet CLI and have it run the test. Then it would be trivial to add a Github Action to run the image.

It was going to look something akin to

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env

WORKDIR /app

COPY . ./

WORKDIR /app/DailyScreenshotTest

ENTRYPOINT [ "dotnet", "test" ]

However, the container would basically always error around:

The mod build package can't find your game folder

or...

The mod build package found a game folder at /app, but it doesn't contain the Stardew Valley file. If this folder is invalid, delete it and the package will autodetect another game install path.

I've even attempted copying the game files into the Docker container. But no real success 🤷 . But maybe someone else might have better luck.