-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (35 loc) · 1.44 KB
/
Copy pathMakefile
File metadata and controls
45 lines (35 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
.PHONY: build test coverage pack format clean mutate docs docs-serve
CONFIGURATION ?= Release
NUPKG_DIR ?= nupkgs
DOCFX_DIR ?= docs
TESTS_DIR ?= TestResults
STRYKER_DIR ?= StrykerOutput
build: ## Build all projects (Release)
dotnet build --configuration $(CONFIGURATION)
test: build ## Run all tests with coverage
dotnet test --no-build --configuration $(CONFIGURATION) \
--collect:"XPlat Code Coverage" \
--results-directory ./$(TESTS_DIR)
coverage: test ## Generate HTML coverage report
dotnet reportgenerator \
-reports:./$(TESTS_DIR)/**/coverage.cobertura.xml \
-targetdir:./$(TESTS_DIR) \
-reporttypes:Html \
-verbosity:Warning \
-filefilters:-**/*.g.cs
@echo "Coverage report: file://$(CURDIR)/$(TESTS_DIR)/index.html"
pack: build ## Build NuGet packages
dotnet pack --no-restore --configuration $(CONFIGURATION) \
--output ./$(NUPKG_DIR)
format: ## Auto-fix all code formatting (style, analyzers, whitespace)
dotnet format whitespace --verbosity diagnostic
dotnet format --verbosity diagnostic
clean: ## Remove all build artifacts
dotnet clean
rm -rf ./$(STRYKER_DIR) ./$(TESTS_DIR) ./$(NUPKG_DIR) ./$(DOCFX_DIR)/_site ./$(DOCFX_DIR)/api
mutate: build ## Run Stryker mutation testing
dotnet stryker
docs: build ## Build documentation site
dotnet docfx $(DOCFX_DIR)/docfx.json
docs-serve: build ## Build and serve documentation locally (http://localhost:8080)
dotnet docfx $(DOCFX_DIR)/docfx.json --serve