Last active
December 16, 2023 17:40
-
-
Save hesenger/78683b600cc90687ab0a953ccbd7d934 to your computer and use it in GitHub Desktop.
Basic Makefile for dotnet projects with build, run, test and code coverage calculation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# easily create the file with this gist content using the following curl command | |
# curl https://gist.githubusercontent.com/hesenger/78683b600cc90687ab0a953ccbd7d934/raw > Makefile | |
help: | |
@cat Makefile | |
build: | |
@dotnet build | |
run: | |
@dotnet watch run --project ./Web/Web.csproj | |
test: | |
@rm -rf ./TestResults | |
@dotnet test --collect:"XPlat Code Coverage" --results-directory:"./TestResults" | |
@reportgenerator -reports:./TestResults/**/coverage.cobertura.xml -targetdir:./TestResults/ | |
@open ./TestResults/index.html | |
startdb: | |
@docker-compose up -d | |
stopdb: | |
@docker-compose stop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
add comment with the curl command