@@ -373,6 +373,106 @@ jobs:
373373 shell : pwsh
374374 run : __tests__/verify-dotnet.ps1 -Patterns "^6.0", "^8.0"
375375
376+ test-setup-global-json-rollforward-latestmajor :
377+ runs-on : ${{ matrix.operating-system }}
378+ strategy :
379+ fail-fast : false
380+ matrix :
381+ operating-system : [ubuntu-latest, windows-latest, macos-13]
382+ steps :
383+ - name : Checkout
384+ uses : actions/checkout@v3
385+ - name : Clear toolcache
386+ shell : pwsh
387+ run : __tests__/clear-toolcache.ps1 ${{ runner.os }}
388+ - name : Write global.json
389+ shell : bash
390+ run : |
391+ mkdir subdirectory
392+ echo '{"sdk":{"version": "3.1.0","rollForward": "latestMajor"}}' > ./subdirectory/global.json
393+ - name : Setup dotnet
394+ uses : ./
395+ with :
396+ global-json-file : ./subdirectory/global.json
397+ - name : Verify dotnet
398+ shell : pwsh
399+ run : __tests__/verify-dotnet.ps1 -Patterns "^(?!3)"
400+
401+ test-setup-global-json-rollforward-latestminor :
402+ runs-on : ${{ matrix.operating-system }}
403+ strategy :
404+ fail-fast : false
405+ matrix :
406+ operating-system : [ubuntu-latest, windows-latest, macos-13]
407+ steps :
408+ - name : Checkout
409+ uses : actions/checkout@v3
410+ - name : Clear toolcache
411+ shell : pwsh
412+ run : __tests__/clear-toolcache.ps1 ${{ runner.os }}
413+ - name : Write global.json
414+ shell : bash
415+ run : |
416+ mkdir subdirectory
417+ echo '{"sdk":{"version": "3.0.100","rollForward": "latestMinor"}}' > ./subdirectory/global.json
418+ - name : Setup dotnet
419+ uses : ./
420+ with :
421+ global-json-file : ./subdirectory/global.json
422+ - name : Verify dotnet
423+ shell : pwsh
424+ run : __tests__/verify-dotnet.ps1 -Patterns "^3.1"
425+
426+ test-setup-global-json-rollforward-latestfeature :
427+ runs-on : ${{ matrix.operating-system }}
428+ strategy :
429+ fail-fast : false
430+ matrix :
431+ operating-system : [ubuntu-latest, windows-latest, macos-13]
432+ steps :
433+ - name : Checkout
434+ uses : actions/checkout@v3
435+ - name : Clear toolcache
436+ shell : pwsh
437+ run : __tests__/clear-toolcache.ps1 ${{ runner.os }}
438+ - name : Write global.json
439+ shell : bash
440+ run : |
441+ mkdir subdirectory
442+ echo '{"sdk":{"version": "3.1.100","rollForward": "latestFeature"}}' > ./subdirectory/global.json
443+ - name : Setup dotnet
444+ uses : ./
445+ with :
446+ global-json-file : ./subdirectory/global.json
447+ - name : Verify dotnet
448+ shell : pwsh
449+ run : __tests__/verify-dotnet.ps1 -Patterns "^3.1.4"
450+
451+ test-setup-global-json-rollforward-latestpatch :
452+ runs-on : ${{ matrix.operating-system }}
453+ strategy :
454+ fail-fast : false
455+ matrix :
456+ operating-system : [ubuntu-latest, windows-latest, macos-13]
457+ steps :
458+ - name : Checkout
459+ uses : actions/checkout@v3
460+ - name : Clear toolcache
461+ shell : pwsh
462+ run : __tests__/clear-toolcache.ps1 ${{ runner.os }}
463+ - name : Write global.json
464+ shell : bash
465+ run : |
466+ mkdir subdirectory
467+ echo '{"sdk":{"version": "5.0.400","rollForward": "latestPatch"}}' > ./subdirectory/global.json
468+ - name : Setup dotnet
469+ uses : ./
470+ with :
471+ global-json-file : ./subdirectory/global.json
472+ - name : Verify dotnet
473+ shell : pwsh
474+ run : __tests__/verify-dotnet.ps1 -Patterns "^5.0.408$"
475+
376476 test-setup-global-json-only :
377477 runs-on : ${{ matrix.operating-system }}
378478 strategy :
0 commit comments