-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTaskfile.yml
More file actions
110 lines (94 loc) · 3.32 KB
/
Copy pathTaskfile.yml
File metadata and controls
110 lines (94 loc) · 3.32 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
version: '3'
vars:
SOLUTION: ModularityKit.Mutator.slnx
CONFIGURATION: '{{default "Release" .CONFIGURATION}}'
CORE_TEST_PROJECT: Tests/ModularityKit.Mutator.Tests/ModularityKit.Mutator.Tests.csproj
GOVERNANCE_TEST_PROJECT: Tests/ModularityKit.Mutator.Governance.Tests/ModularityKit.Mutator.Governance.Tests.csproj
GOVERNANCE_REDIS_TEST_PROJECT: Tests/ModularityKit.Mutator.Governance.Redis.Tests/ModularityKit.Mutator.Governance.Redis.Tests.csproj
SMOKE_TEST_PROJECT: Tests/ModularityKit.Mutator.Examples.SmokeTests/ModularityKit.Mutator.Examples.SmokeTests.csproj
tasks:
default:
desc: List available repository tasks
cmds:
- task --list-all
silent: true
restore:
desc: Restore the solution
cmds:
- dotnet restore {{.SOLUTION}}
clean:
desc: Clean the solution
cmds:
- dotnet clean {{.SOLUTION}} -c {{.CONFIGURATION}}
build:
desc: Build the solution
deps: [restore]
cmds:
- dotnet build {{.SOLUTION}} -c {{.CONFIGURATION}} --no-restore
test:
desc: Run the main test packages and smoke tests
deps:
- test:core
- test:governance
- test:governance:redis
- test:smoke
test:core:
desc: Run core runtime tests
deps: [restore]
cmds:
- dotnet test {{.CORE_TEST_PROJECT}} -c {{.CONFIGURATION}} --no-restore
test:governance:
desc: Run governance tests
deps: [restore]
cmds:
- dotnet test {{.GOVERNANCE_TEST_PROJECT}} -c {{.CONFIGURATION}} --no-restore
test:governance:redis:
desc: Run Redis governance tests
deps: [restore]
cmds:
- dotnet test {{.GOVERNANCE_REDIS_TEST_PROJECT}} -c {{.CONFIGURATION}} --no-restore
test:smoke:
desc: Run example smoke tests
deps: [restore]
cmds:
- dotnet test {{.SMOKE_TEST_PROJECT}} -c {{.CONFIGURATION}} --no-restore
test:project:
desc: Run a specific test project with an optional filter
deps: [restore]
preconditions:
- sh: test -n "{{.PROJECT}}"
msg: 'PROJECT is required. Example: task test:project PROJECT=Tests/ModularityKit.Mutator.Tests/ModularityKit.Mutator.Tests.csproj'
cmds:
- >
dotnet test {{.PROJECT}} -c {{.CONFIGURATION}} --no-restore{{if .FILTER}} --filter "{{.FILTER}}"{{end}}
format:
desc: Format the solution
deps: [restore]
cmds:
- dotnet format {{.SOLUTION}}
deps:
desc: Run dependency health checks
deps: [restore]
cmds:
- python3 -m scripts.dependencies.check_package_health --solution {{.SOLUTION}}
docs:
desc: Build the DocFX site
cmds:
- dotnet tool update -g docfx
- dotnet build {{.SOLUTION}} -c {{.CONFIGURATION}}
- docfx docfx.json
verify:package-signing:
desc: Verify signed NuGet packages with a signer fingerprint
preconditions:
- sh: test -n "{{.PACKAGE}}"
msg: 'PACKAGE is required. Example: task verify:package-signing PACKAGE=dist/ModularityKit.Mutator.0.1.0.nupkg FINGERPRINT=<sha256>'
- sh: test -n "{{.FINGERPRINT}}"
msg: 'FINGERPRINT is required. Example: task verify:package-signing PACKAGE=dist/ModularityKit.Mutator.0.1.0.nupkg FINGERPRINT=<sha256>'
cmds:
- dotnet nuget verify {{.PACKAGE}} --all --certificate-fingerprint {{.FINGERPRINT}}
verify:
desc: Run the common local verification workflow
deps:
- build
- deps
- test