33
33
3.0.x
34
34
- name : Verify dotnet
35
35
shell : pwsh
36
- run : __tests__/verify-dotnet.ps1 2.2.402 3.1.404 ' 3.0'
36
+ run : __tests__/verify-dotnet.ps1 -Patterns "^ 2.2.402$", "^ 3.1.404$", "^ 3.0"
37
37
38
38
test-setup-full-version :
39
39
runs-on : ${{ matrix.operating-system }}
60
60
source-url : https://api.nuget.org/v3/index.json
61
61
env :
62
62
NUGET_AUTH_TOKEN : NOTATOKEN
63
- - name : Verify nuget config file
64
- shell : pwsh
65
- run : |
66
- if (-Not (Test-Path "../nuget.config")) { throw "nuget file not generated correctly" }
67
63
- name : Verify dotnet
68
64
shell : pwsh
69
- run : __tests__/verify-dotnet.ps1 3.1.201 2.2.402
65
+ run : __tests__/verify-dotnet.ps1 -Patterns "^ 3.1.201$", "^ 2.2.402$" -CheckNugetConfig
70
66
71
67
test-setup-without-patch-version :
72
68
runs-on : ${{ matrix.operating-system }}
91
87
dotnet-version : ' 2.2'
92
88
- name : Verify dotnet
93
89
shell : pwsh
94
- run : __tests__/verify-dotnet.ps1 3.1 2.2
90
+ run : __tests__/verify-dotnet.ps1 -Patterns "^ 3.1", "^ 2.2"
95
91
96
92
test-setup-prerelease-version :
97
93
runs-on : ${{ matrix.operating-system }}
@@ -105,17 +101,13 @@ jobs:
105
101
- name : Clear toolcache
106
102
shell : pwsh
107
103
run : __tests__/clear-toolcache.ps1 ${{ runner.os }}
108
- - name : Setup dotnet '2.2'
109
- uses : ./
110
- with :
111
- dotnet-version : ' 2.2'
112
104
- name : Setup dotnet '3.1.100-preview1-014459'
113
105
uses : ./
114
106
with :
115
107
dotnet-version : ' 3.1.100-preview1-014459'
116
108
- name : Verify dotnet
117
109
shell : pwsh
118
- run : __tests__/verify-dotnet.ps1 3.1.100-preview1-014459
110
+ run : __tests__/verify-dotnet.ps1 -Patterns " 3.1.100-preview1-014459"
119
111
120
112
test-setup-latest-patch-version :
121
113
runs-on : ${{ matrix.operating-system }}
@@ -139,7 +131,7 @@ jobs:
139
131
dotnet-version : 2.2.X
140
132
- name : Verify dotnet
141
133
shell : pwsh
142
- run : __tests__/verify-dotnet.ps1 ' 2.2' ' 3.1'
134
+ run : __tests__/verify-dotnet.ps1 -Patterns "^ 2.2", "^ 3.1"
143
135
144
136
test-setup-with-wildcard :
145
137
runs-on : ${{ matrix.operating-system }}
@@ -163,7 +155,7 @@ jobs:
163
155
dotnet-version : 2.2.*
164
156
- name : Verify dotnet
165
157
shell : pwsh
166
- run : __tests__/verify-dotnet.ps1 3.1 2.2
158
+ run : __tests__/verify-dotnet.ps1 -Patterns "^ 3.1", "^ 2.2"
167
159
168
160
test-setup-global-json-specified-and-version :
169
161
runs-on : ${{ matrix.operating-system }}
@@ -181,15 +173,15 @@ jobs:
181
173
shell : bash
182
174
run : |
183
175
mkdir subdirectory
184
- echo '{"sdk":{"version": "2.2","rollForward": "latestFeature"}}' > ./subdirectory/global.json
176
+ echo '{"sdk":{"version": "2.2.207 ","rollForward": "latestFeature"}}' > ./subdirectory/global.json
185
177
- name : Setup dotnet
186
178
uses : ./
187
179
with :
188
180
dotnet-version : 3.1
189
181
global-json-file : ./subdirectory/global.json
190
182
- name : Verify dotnet
191
183
shell : pwsh
192
- run : __tests__/verify-dotnet.ps1 2.2 3.1
184
+ run : __tests__/verify-dotnet.ps1 -Patterns "^ 2.2", "^ 3.1"
193
185
194
186
test-setup-with-dotnet-quality :
195
187
runs-on : ${{ matrix.operating-system }}
@@ -209,12 +201,9 @@ jobs:
209
201
with :
210
202
dotnet-version : ' 7.0'
211
203
dotnet-quality : ' preview'
212
- - name : Verify preview version
204
+ - name : Verify dotnet
213
205
shell : pwsh
214
- run : |
215
- $version = & dotnet --version
216
- Write-Host "Installed version: $version"
217
- if (-not ($version.Contains("preview") -or $version.Contains("rc"))) { throw "Unexpected version" }
206
+ run : __tests__/verify-dotnet.ps1 -Patterns "^7\.0\.\d+-"
218
207
219
208
test-dotnet-version-output-during-single-version-installation :
220
209
runs-on : ${{ matrix.operating-system }}
@@ -273,7 +262,7 @@ jobs:
273
262
test-proxy :
274
263
runs-on : ubuntu-latest
275
264
container :
276
- image : mcr.microsoft.com/dotnet/core/runtime-deps:3.0-bionic
265
+ image : ubuntu:latest
277
266
options : --dns 127.0.0.1
278
267
services :
279
268
squid-proxy :
@@ -286,21 +275,29 @@ jobs:
286
275
steps :
287
276
- name : Checkout
288
277
uses : actions/checkout@v3
289
- - name : Clear tool cache
290
- run : rm -rf "/usr/share/dotnet"
291
- - name : Install curl
278
+ - name : Install Powershell
292
279
run : |
293
- apt update
294
- apt -y install curl
295
- - name : Setup dotnet 3.1.201
280
+ apt-get update
281
+ apt-get install -y wget apt-transport-https software-properties-common
282
+ wget -q "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb"
283
+ dpkg -i packages-microsoft-prod.deb
284
+ rm packages-microsoft-prod.deb
285
+ apt-get update
286
+ apt-get install -y powershell
287
+ - name : Clear toolcache
288
+ shell : pwsh
289
+ run : __tests__/clear-toolcache.ps1 ${{ runner.os }}
290
+ - name : Setup dotnet 6.0
296
291
uses : ./
297
292
with :
298
- dotnet-version : 3.1.201
293
+ dotnet-version : 6.0
299
294
source-url : https://api.nuget.org/v3/index.json
300
295
env :
301
296
NUGET_AUTH_TOKEN : NOTATOKEN
302
297
- name : Verify dotnet
303
- run : __tests__/verify-dotnet.sh 3.1.201
298
+ shell : pwsh
299
+ run : |
300
+ __tests__/verify-dotnet.ps1 -Patterns "^6.0" -CheckNugetConfig
304
301
305
302
test-bypass-proxy :
306
303
runs-on : ubuntu-latest
@@ -310,8 +307,9 @@ jobs:
310
307
steps :
311
308
- name : Checkout
312
309
uses : actions/checkout@v3
313
- - name : Clear tool cache
314
- run : rm -rf "/usr/share/dotnet"
310
+ - name : Clear toolcache
311
+ shell : pwsh
312
+ run : __tests__/clear-toolcache.ps1 ${{ runner.os }}
315
313
- name : Setup dotnet 3.1.201
316
314
uses : ./
317
315
with :
@@ -320,4 +318,5 @@ jobs:
320
318
env :
321
319
NUGET_AUTH_TOKEN : NOTATOKEN
322
320
- name : Verify dotnet
323
- run : __tests__/verify-dotnet.sh 3.1.201
321
+ shell : pwsh
322
+ run : __tests__/verify-dotnet.ps1 -Patterns "^3.1.201$" -CheckNugetConfig
0 commit comments