FoogRL - GitHub Build Actions - .NET Winforms


No real content progress this week which is a slight bummer but I wanted to spend a little time addressing a bit of a long-term issue, that I just keep forgetting to run the unit tests before committing new features into branches or PR into main.

So I decided to finally set-up some GitHub actions to build the project and run unit tests after every merge.

.NET Core vs .NET 4.8

All the default actions for GitHub for .NET assume the project is .NET Core which obviously makes sense but for me was a little issue because my game is .NET 4.8 and I didn’t really have the stomach to upgrade to .NET Core just for this issue.

The main issue for me with the default .NET Core actions is the use of dotnet test:

# Execute all unit tests in the solution
- name: Execute unit tests
  run: dotnet test

Can’t use that for .NET 4.8 so had to figure out an alternative to that which turns out is vstest.console. Borrowing from the approach here: https://github.com/marketplace/actions/setup-vstest-console-exe :

# Execute all unit tests in the solution
- name: Execute unit tests
  run: vstest.console.exe /InIsolation FoogRL.Test\FoogRL.Test\bin\Release\FoogRL.Test.dll

Wasn’t just as simple as that because also has to include a step in the pipeline to set-up vstest.console:

- name: Setup VSTest.console.exe
  uses: darenm/Setup-VSTest@v1

So yeah, not a very exciting week I suppose but a very important feature to have, especially once I release a version out in the wilds, really need a consistent, robust way to build the app.

Remaining items for beta v0.6

Also moved a few features out of the Beta release and into future releases

  • Enhancements: 11
  • Bugs: 27

Leave a comment

Log in with itch.io to leave a comment.