@@ -201,6 +201,106 @@ jobs:
201201 shell : pwsh
202202 run : __tests__/verify-dotnet.ps1 -Patterns "^2.2", "^3.1"
203203
204+ test-setup-global-json-rollforward-latestmajor :
205+ runs-on : ${{ matrix.operating-system }}
206+ strategy :
207+ fail-fast : false
208+ matrix :
209+ operating-system : [ubuntu-latest, windows-latest, macos-13]
210+ steps :
211+ - name : Checkout
212+ uses : actions/checkout@v3
213+ - name : Clear toolcache
214+ shell : pwsh
215+ run : __tests__/clear-toolcache.ps1 ${{ runner.os }}
216+ - name : Write global.json
217+ shell : bash
218+ run : |
219+ mkdir subdirectory
220+ echo '{"sdk":{"version": "3.1.0","rollForward": "latestMajor"}}' > ./subdirectory/global.json
221+ - name : Setup dotnet
222+ uses : ./
223+ with :
224+ global-json-file : ./subdirectory/global.json
225+ - name : Verify dotnet
226+ shell : pwsh
227+ run : __tests__/verify-dotnet.ps1 -Patterns "^(?!3)"
228+
229+ test-setup-global-json-rollforward-latestminor :
230+ runs-on : ${{ matrix.operating-system }}
231+ strategy :
232+ fail-fast : false
233+ matrix :
234+ operating-system : [ubuntu-latest, windows-latest, macos-13]
235+ steps :
236+ - name : Checkout
237+ uses : actions/checkout@v3
238+ - name : Clear toolcache
239+ shell : pwsh
240+ run : __tests__/clear-toolcache.ps1 ${{ runner.os }}
241+ - name : Write global.json
242+ shell : bash
243+ run : |
244+ mkdir subdirectory
245+ echo '{"sdk":{"version": "3.0.100","rollForward": "latestMinor"}}' > ./subdirectory/global.json
246+ - name : Setup dotnet
247+ uses : ./
248+ with :
249+ global-json-file : ./subdirectory/global.json
250+ - name : Verify dotnet
251+ shell : pwsh
252+ run : __tests__/verify-dotnet.ps1 -Patterns "^3.1"
253+
254+ test-setup-global-json-rollforward-latestfeature :
255+ runs-on : ${{ matrix.operating-system }}
256+ strategy :
257+ fail-fast : false
258+ matrix :
259+ operating-system : [ubuntu-latest, windows-latest, macos-13]
260+ steps :
261+ - name : Checkout
262+ uses : actions/checkout@v3
263+ - name : Clear toolcache
264+ shell : pwsh
265+ run : __tests__/clear-toolcache.ps1 ${{ runner.os }}
266+ - name : Write global.json
267+ shell : bash
268+ run : |
269+ mkdir subdirectory
270+ echo '{"sdk":{"version": "3.1.100","rollForward": "latestFeature"}}' > ./subdirectory/global.json
271+ - name : Setup dotnet
272+ uses : ./
273+ with :
274+ global-json-file : ./subdirectory/global.json
275+ - name : Verify dotnet
276+ shell : pwsh
277+ run : __tests__/verify-dotnet.ps1 -Patterns "^3.1.4"
278+
279+ test-setup-global-json-rollforward-latestpatch :
280+ runs-on : ${{ matrix.operating-system }}
281+ strategy :
282+ fail-fast : false
283+ matrix :
284+ operating-system : [ubuntu-latest, windows-latest, macos-13]
285+ steps :
286+ - name : Checkout
287+ uses : actions/checkout@v3
288+ - name : Clear toolcache
289+ shell : pwsh
290+ run : __tests__/clear-toolcache.ps1 ${{ runner.os }}
291+ - name : Write global.json
292+ shell : bash
293+ run : |
294+ mkdir subdirectory
295+ echo '{"sdk":{"version": "5.0.400","rollForward": "latestPatch"}}' > ./subdirectory/global.json
296+ - name : Setup dotnet
297+ uses : ./
298+ with :
299+ global-json-file : ./subdirectory/global.json
300+ - name : Verify dotnet
301+ shell : pwsh
302+ run : __tests__/verify-dotnet.ps1 -Patterns "^5.0.408$"
303+
204304 test-setup-global-json-only :
205305 runs-on : ${{ matrix.operating-system }}
206306 strategy :
0 commit comments