-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaskfile.yml
More file actions
191 lines (167 loc) Β· 6.28 KB
/
Copy pathTaskfile.yml
File metadata and controls
191 lines (167 loc) Β· 6.28 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
version: '3'
dotenv:
- .env
vars:
SOLUTION: EntityFrameworkCore.DynamoDb.slnx
EF11_DOTNET_DIR: .dotnet/ef11
tasks:
clean:
desc: Clean build artifacts without requiring restored assets
silent: true
cmds:
- echo "π§Ή Cleaning build artifacts"
- '[ -d ./.nupkg ] && rm -r ./.nupkg || true'
- find . -type d \( -name bin -o -name obj \) -prune -exec rm -rf {} +
- echo "β
Cleaning complete"
restore:
desc: Restore dependencies for CONFIG (default Debug EF10)
silent: true
vars:
CONFIG: '{{.CONFIG | default "Debug EF10"}}'
cmds:
- echo "π₯ Restoring {{.CONFIG}}"
- dotnet restore {{.SOLUTION}} -p:Configuration="{{.CONFIG}}"
- echo "β
Dependencies restored"
build:
desc: Build CONFIG (default Debug EF10). Example, task build CONFIG="Debug EF11"
silent: true
vars:
CONFIG: '{{.CONFIG | default "Debug EF10"}}'
cmds:
- task: restore
vars: { CONFIG: '{{.CONFIG}}' }
- echo "π¨ Building {{.CONFIG}}"
- dotnet build {{.SOLUTION}} --configuration "{{.CONFIG}}" --no-restore
- echo "β
{{.CONFIG}} build complete"
build:ef10:
desc: Build Debug EF10
cmds:
- task: build
vars: { CONFIG: 'Debug EF10' }
build:ef11:
desc: Build Debug EF11 with installed/default dotnet SDK
cmds:
- task: build
vars: { CONFIG: 'Debug EF11' }
sdk:ef11:
desc: Install CI-matching .NET 11 SDK into .dotnet/ef11
silent: true
cmds:
- echo "π₯ Installing .NET 11 SDK to {{.EF11_DOTNET_DIR}}"
- mkdir -p {{.EF11_DOTNET_DIR}}
- curl -sSL https://dot.net/v1/dotnet-install.sh -o {{.EF11_DOTNET_DIR}}/dotnet-install.sh
- bash {{.EF11_DOTNET_DIR}}/dotnet-install.sh --channel 11.0 --install-dir {{.EF11_DOTNET_DIR}} --skip-non-versioned-files
- '{{.EF11_DOTNET_DIR}}/dotnet --version'
- echo "β
.NET 11 SDK ready"
build:ef11:ci-sdk:
desc: Build Debug EF11 using .dotnet/ef11 SDK (runs sdk:ef11 first)
deps: [ sdk:ef11 ]
silent: true
cmds:
- echo "π₯ Restoring Debug EF11 with CI-matching SDK"
- DOTNET_ROOT={{.EF11_DOTNET_DIR}} PATH={{.EF11_DOTNET_DIR}}:$PATH dotnet restore {{.SOLUTION}} -p:Configuration="Debug EF11"
- echo "π¨ Building Debug EF11 with CI-matching SDK"
- DOTNET_ROOT={{.EF11_DOTNET_DIR}} PATH={{.EF11_DOTNET_DIR}}:$PATH dotnet build {{.SOLUTION}} --configuration "Debug EF11" --no-restore
- echo "β
Debug EF11 build complete"
build:all:
desc: Build Debug EF10 and Debug EF11
cmds:
- task: build:ef10
- task: build:ef11
test:
desc: Test solution for CONFIG (default Debug EF10). Example, task test CONFIG="Debug EF11"
silent: true
vars:
CONFIG: '{{.CONFIG | default "Debug EF10"}}'
cmds:
- task: build
vars: { CONFIG: '{{.CONFIG}}' }
- echo "π§ͺ Testing {{.CONFIG}}"
- dotnet test {{.SOLUTION}} --configuration "{{.CONFIG}}" --no-build
test:ef10:
desc: Test Debug EF10
cmds:
- task: test
vars: { CONFIG: 'Debug EF10' }
test:ef11:
desc: Test Debug EF11 with installed/default dotnet SDK
cmds:
- task: test
vars: { CONFIG: 'Debug EF11' }
test:unit:
desc: Test unit project for CONFIG (default Debug EF10)
silent: true
vars:
CONFIG: '{{.CONFIG | default "Debug EF10"}}'
cmds:
- task: build
vars: { CONFIG: '{{.CONFIG}}' }
- dotnet test tests/EntityFrameworkCore.DynamoDb.Tests/EntityFrameworkCore.DynamoDb.Tests.csproj --configuration "{{.CONFIG}}" --no-build
test:spec:
desc: Test specification project for CONFIG (default Debug EF10). Optional FILTER="..."
silent: true
vars:
CONFIG: '{{.CONFIG | default "Debug EF10"}}'
FILTER: '{{.FILTER | default ""}}'
cmds:
- task: build
vars: { CONFIG: '{{.CONFIG}}' }
- echo "π§ͺ Testing spec {{.CONFIG}}{{if .FILTER}} filter={{.FILTER}}{{end}}"
- '{{if .FILTER}}dotnet test tests/EntityFrameworkCore.DynamoDb.SpecificationTests/EntityFrameworkCore.DynamoDb.SpecificationTests.csproj --configuration "{{.CONFIG}}" --no-build --filter "{{.FILTER}}"{{else}}dotnet test tests/EntityFrameworkCore.DynamoDb.SpecificationTests/EntityFrameworkCore.DynamoDb.SpecificationTests.csproj --configuration "{{.CONFIG}}" --no-build{{end}}'
test:spec:ef10:
desc: Test specification project against Debug EF10. Optional FILTER="..."
cmds:
- task: test:spec
vars: { CONFIG: 'Debug EF10', FILTER: '{{.FILTER | default ""}}' }
test:spec:ef11:
desc: Test specification project against Debug EF11. Optional FILTER="..."
cmds:
- task: test:spec
vars: { CONFIG: 'Debug EF11', FILTER: '{{.FILTER | default ""}}' }
test:spec:all:
desc: Test specification project against Debug EF10 and Debug EF11. Optional FILTER="..."
cmds:
- task: test:spec:ef10
vars: { FILTER: '{{.FILTER | default ""}}' }
- task: test:spec:ef11
vars: { FILTER: '{{.FILTER | default ""}}' }
pack:
desc: Pack CONFIG (default Release EF10). Example, task pack CONFIG="Release EF11"
silent: true
vars:
CONFIG: '{{.CONFIG | default "Release EF10"}}'
cmds:
- echo "π¦ Packing {{.CONFIG}}"
- dotnet restore {{.SOLUTION}} -p:Configuration="{{.CONFIG}}"
- dotnet pack src/EntityFrameworkCore.DynamoDb/EntityFrameworkCore.DynamoDb.csproj --configuration "{{.CONFIG}}" --no-restore --output ./.nupkg
- echo "β
Packed {{.CONFIG}}"
pack:ef10:
desc: Pack Release EF10
cmds:
- task: pack
vars: { CONFIG: 'Release EF10' }
pack:ef11:
desc: Pack Release EF11
cmds:
- task: pack
vars: { CONFIG: 'Release EF11' }
publish:
desc: Publish packages from .nupkg to NuGet
silent: true
cmds:
- echo "π Publishing"
- dotnet nuget push ./.nupkg/*.nupkg --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY_LOCAL --skip-duplicate
- echo "β¨ Published"
docs:serve:
desc: Serve docs locally with Zensical
silent: true
cmds:
- echo "π Serving Docs"
- uv run zensical serve -f zensical.toml
docs:build:
desc: Build docs site with Zensical
silent: true
cmds:
- echo "π Building Docs"
- uv run zensical build -f zensical.toml
- echo "β
Docs built"