I use NUnit framework to test my .NET project. I want to run my tests via GitHub Actions.
What should be included in the assembly of my project? Maybe there are some standard examples?
You do not need to include anything into your assembly to run your tests using GitHub Actions. Just create workflow file in .github/workflows
folder with the following content (assuming that you have .NET Core project):
---
name: Tests
on: push
jobs:
tests:
name: Unit Testing
runs-on: windows-latest
steps:
- uses: actions/[email protected]
- run: dotnet test
dotnet
is pre-installed onwindows
machine but is not pre-installed onmacos
andubuntu
. So, you have to installdotnet
by adding an extra step in case you want to run it on one of these machines. You can use actions/setup-dotnet action for this purpose.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With