removes end-of-line dotnet versions (#647)

Co-authored-by: “gowridurgad” <“hgowridurgad@github.com>
This commit is contained in:
gowridurgad
2025-06-24 22:06:43 +05:30
committed by GitHub
parent 267870a9c4
commit 0f55b457d2
6 changed files with 201 additions and 316 deletions

View File

@ -24,17 +24,16 @@ jobs:
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 2.2.402, 3.1.404 and 3.0.x
- name: Setup dotnet 6.0.427, 7.0.410 and 7.0.x
uses: ./
with:
dotnet-version: |
2.2.402
3.1.404
3.0.x
6.0.427
7.0.410
7.0.x
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^2.2.402$", "^3.1.404$", "^3.0"
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0.427$", "^7.0.410$", "^7.0"
test-setup-multiple-versions-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
@ -47,17 +46,16 @@ jobs:
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 6.0.427, 8.0.403 and 8.0.x
- name: Setup dotnet 8.0.403, 9.0.301 and 8.0.x
uses: ./
with:
dotnet-version: |
6.0.427
8.0.403
9.0.301
8.0.x
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0.427$", "^8.0.403$", "^8.0"
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0.403$", "^9.0.301$", "^8.0"
test-setup-full-version:
runs-on: ${{ matrix.operating-system }}
strategy:
@ -70,23 +68,22 @@ jobs:
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
# Side-by-side install of 2.2 and 3.1 used for the test project
- name: Setup dotnet 2.2.402
# Side-by-side install of 6.0 and 7.0 used for the test project
- name: Setup dotnet 6.0.427
uses: ./
with:
dotnet-version: 2.2.402
- name: Setup dotnet 3.1.201
dotnet-version: 6.0.427
- name: Setup dotnet 7.0.410
uses: ./
with:
dotnet-version: 3.1.201
dotnet-version: 7.0.410
# We are including this variable to force the generation of the nuget config file to verify that it is created in the correct place
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: NOTATOKEN
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^3.1.201$", "^2.2.402$" -CheckNugetConfig
run: __tests__/verify-dotnet.ps1 -Patterns "^7.0.410$", "^6.0.427$" -CheckNugetConfig
test-setup-full-version-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
@ -99,23 +96,22 @@ jobs:
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
# Side-by-side install of 6.0 and 8.0 used for the test project
- name: Setup dotnet 6.0.427
uses: ./
with:
dotnet-version: 6.0.427
# Side-by-side install of 8.0 and 9.0 used for the test project
- name: Setup dotnet 8.0.402
uses: ./
with:
dotnet-version: 8.0.402
- name: Setup dotnet 9.0.301
uses: ./
with:
dotnet-version: 9.0.301
# We are including this variable to force the generation of the nuget config file to verify that it is created in the correct place
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: NOTATOKEN
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0.402$", "^6.0.427$" -CheckNugetConfig
run: __tests__/verify-dotnet.ps1 -Patterns "^9.0.301$", "^8.0.402$" -CheckNugetConfig
test-setup-without-patch-version:
runs-on: ${{ matrix.operating-system }}
strategy:
@ -128,19 +124,18 @@ jobs:
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
# 2.0, 3.0, 5.0 needs to be in single quotes to interpret as a string instead of as an integer
- name: Setup dotnet '3.1'
# 6.0, 7.0 needs to be in single quotes to interpret as a string instead of as an integer
- name: Setup dotnet '6.0'
uses: ./
with:
dotnet-version: '3.1'
- name: Setup dotnet '2.2'
dotnet-version: '6.0'
- name: Setup dotnet '7.0'
uses: ./
with:
dotnet-version: '2.2'
dotnet-version: '7.0'
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^3.1", "^2.2"
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0", "^7.0"
test-setup-without-patch-version-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
@ -153,19 +148,18 @@ jobs:
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
# 6.0, 7.0, 8.0 needs to be in single quotes to interpret as a string instead of as an integer
# 8.0, 9.0 needs to be in single quotes to interpret as a string instead of as an integer
- name: Setup dotnet '8.0'
uses: ./
with:
dotnet-version: '8.0'
- name: Setup dotnet '6.0'
- name: Setup dotnet '9.0'
uses: ./
with:
dotnet-version: '6.0'
dotnet-version: '9.0'
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0", "^6.0"
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0", "^9.0"
test-setup-prerelease-version:
runs-on: ${{ matrix.operating-system }}
strategy:
@ -178,13 +172,13 @@ jobs:
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet '3.1.100-preview1-014459'
- name: Setup dotnet '6.0.100-preview.7.21379.14'
uses: ./
with:
dotnet-version: '3.1.100-preview1-014459'
dotnet-version: '6.0.100-preview.7.21379.14'
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "3.1.100-preview1-014459"
run: __tests__/verify-dotnet.ps1 -Patterns "6.0.100-preview.7.21379.14"
test-setup-prerelease-version-extended:
runs-on: ${{ matrix.operating-system }}
@ -218,18 +212,17 @@ jobs:
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 3.1.x
- name: Setup dotnet 6.0.x
uses: ./
with:
dotnet-version: 3.1.x
- name: Setup dotnet 2.2.X
dotnet-version: 6.0.x
- name: Setup dotnet 7.0.X
uses: ./
with:
dotnet-version: 2.2.X
dotnet-version: 7.0.X
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^2.2", "^3.1"
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0", "^7.0"
test-setup-latest-patch-version-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
@ -246,13 +239,13 @@ jobs:
uses: ./
with:
dotnet-version: 8.0.x
- name: Setup dotnet 6.0.X
- name: Setup dotnet 9.0.X
uses: ./
with:
dotnet-version: 6.0.X
dotnet-version: 9.0.X
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0", "^8.0"
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0", "^9.0"
test-ABCxx-syntax:
runs-on: ${{ matrix.operating-system }}
@ -288,18 +281,17 @@ jobs:
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 3.1.*
- name: Setup dotnet 6.0.*
uses: ./
with:
dotnet-version: 3.1.*
- name: Setup dotnet 2.2.*
dotnet-version: 6.0.*
- name: Setup dotnet 7.0.*
uses: ./
with:
dotnet-version: 2.2.*
dotnet-version: 7.0.*
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^3.1", "^2.2"
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0", "^7.0"
test-setup-with-wildcard-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
@ -316,13 +308,13 @@ jobs:
uses: ./
with:
dotnet-version: 8.0.*
- name: Setup dotnet 6.0.*
- name: Setup dotnet 9.0.*
uses: ./
with:
dotnet-version: 6.0.*
dotnet-version: 9.0.*
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0", "^6.0"
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0", "^9.0"
test-setup-global-json-specified-and-version:
runs-on: ${{ matrix.operating-system }}
@ -340,16 +332,15 @@ jobs:
shell: bash
run: |
mkdir subdirectory
echo '{"sdk":{"version": "2.2.207","rollForward": "latestFeature"}}' > ./subdirectory/global.json
echo '{"sdk":{"version": "6.0.424","rollForward": "latestFeature"}}' > ./subdirectory/global.json
- name: Setup dotnet
uses: ./
with:
dotnet-version: 3.1
dotnet-version: 7.0
global-json-file: ./subdirectory/global.json
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^2.2", "^3.1"
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0", "^7.0"
test-setup-global-json-specified-and-version-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
@ -366,15 +357,15 @@ jobs:
shell: bash
run: |
mkdir subdirectory
echo '{"sdk":{"version": "6.0.424","rollForward": "latestFeature"}}' > ./subdirectory/global.json
echo '{"sdk":{"version": "8.0.402","rollForward": "latestFeature"}}' > ./subdirectory/global.json
- name: Setup dotnet
uses: ./
with:
dotnet-version: '8.0'
dotnet-version: '9.0'
global-json-file: ./subdirectory/global.json
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0", "^8.0"
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0", "^9.0"
test-setup-global-json-only:
runs-on: ${{ matrix.operating-system }}
@ -392,14 +383,14 @@ jobs:
shell: bash
run: |
mkdir subdirectory
echo '{"sdk":{"version": "2.2.207","rollForward": "latestFeature"}}' > ./subdirectory/global.json
echo '{"sdk":{"version": "6.0.424","rollForward": "latestFeature"}}' > ./subdirectory/global.json
- name: Setup dotnet
uses: ./
with:
global-json-file: ./subdirectory/global.json
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^2.2"
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0"
test-setup-global-json-only-extended:
runs-on: ${{ matrix.operating-system }}
@ -442,14 +433,14 @@ jobs:
shell: bash
run: |
mkdir subdirectory
echo '/* should support comments */ {"sdk":{"version": "2.2.207","rollForward": "latestFeature"}} // should support comments' > ./subdirectory/global.json
echo '/* should support comments */ {"sdk":{"version": "6.0.424","rollForward": "latestFeature"}} // should support comments' > ./subdirectory/global.json
- name: Setup dotnet
uses: ./
with:
global-json-file: ./subdirectory/global.json
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^2.2"
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0"
test-global-json-with-comments-extended:
runs-on: ${{ matrix.operating-system }}
@ -467,14 +458,14 @@ jobs:
shell: bash
run: |
mkdir subdirectory
echo '/* should support comments */ {"sdk":{"version": "6.0.424","rollForward": "latestFeature"}} // should support comments' > ./subdirectory/global.json
echo '/* should support comments */ {"sdk":{"version": "8.0.402","rollForward": "latestFeature"}} // should support comments' > ./subdirectory/global.json
- name: Setup dotnet
uses: ./
with:
global-json-file: ./subdirectory/global.json
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0"
run: __tests__/verify-dotnet.ps1 -Patterns "^8.0"
test-setup-with-dotnet-quality:
runs-on: ${{ matrix.operating-system }}
@ -516,11 +507,11 @@ jobs:
- name: Copy NuGet lock file to root
shell: bash
run: cp ./__tests__/e2e-test-csproj/packages.lock.json ./packages.lock.json
- name: Setup .NET Core 3.1
- name: Setup .NET Core 6.0
id: setup-dotnet
uses: ./
with:
dotnet-version: 3.1
dotnet-version: 6.0
cache: true
- name: Verify Cache
if: steps.setup-dotnet.outputs.cache-hit == 'true'
@ -528,7 +519,7 @@ jobs:
run: if [[ -e ${NUGET_PACKAGES} ]]; then exit 0; else exit 1; fi
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^3.1"
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0"
test-setup-with-cache-extended:
runs-on: ${{ matrix.operating-system }}
@ -575,11 +566,11 @@ jobs:
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup .NET Core 3.1
- name: Setup .NET Core 6.0
id: setup-dotnet
uses: ./
with:
dotnet-version: 3.1
dotnet-version: 6.0
cache: true
cache-dependency-path: './__tests__/e2e-test-csproj/packages.lock.json'
- name: Verify Cache
@ -588,7 +579,7 @@ jobs:
run: if [[ -e ${NUGET_PACKAGES} ]]; then exit 0; else exit 1; fi
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^3.1"
run: __tests__/verify-dotnet.ps1 -Patterns "^6.0"
test-setup-with-cache-dependency-path-extended:
runs-on: ${{ matrix.operating-system }}
@ -633,11 +624,11 @@ jobs:
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 6.0.401
- name: Setup dotnet 8.0.402
uses: ./
id: step1
with:
dotnet-version: '6.0.401'
dotnet-version: '8.0.402'
- name: Verify value of the dotnet-version output
shell: pwsh
@ -660,19 +651,19 @@ jobs:
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 6.0.401, 5.0.408, 7.0.100-rc.1.22431.12
- name: Setup dotnet 8.0.402, 6.0.401, 7.0.100-rc.1.22431.12
uses: ./
id: step2
with:
dotnet-version: |
7.0.100-rc.1.22431.12
8.0.402
6.0.401
5.0.408
7.0.100-rc.1.22431.12
- name: Verify value of the dotnet-version output
shell: pwsh
run: |
$version = "7.0.100-rc.1.22431.12"
$version = "8.0.402"
if (-not ($version -eq '${{steps.step2.outputs.dotnet-version}}')) { throw "Unexpected output value" }
test-proxy:
@ -703,17 +694,17 @@ jobs:
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 6.0
- name: Setup dotnet 8.0
uses: ./
with:
dotnet-version: 6.0
dotnet-version: 8.0
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: NOTATOKEN
- name: Verify dotnet
shell: pwsh
run: |
__tests__/verify-dotnet.ps1 -Patterns "^6.0" -CheckNugetConfig
__tests__/verify-dotnet.ps1 -Patterns "^8.0" -CheckNugetConfig
test-bypass-proxy:
runs-on: ubuntu-22.04
@ -726,16 +717,16 @@ jobs:
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 3.1.201
- name: Setup dotnet 7.0.410
uses: ./
with:
dotnet-version: 3.1.201
dotnet-version: 7.0.410
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: NOTATOKEN
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^3.1.201$" -CheckNugetConfig
run: __tests__/verify-dotnet.ps1 -Patterns "^7.0.410$" -CheckNugetConfig
test-bypass-proxy-extended:
runs-on: ubuntu-latest
@ -765,7 +756,7 @@ jobs:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04, windows-latest, macos-13]
lower-version: ['3.1.426']
lower-version: ['6.0.427']
higher-version: ['7.0.203']
steps:
- name: Checkout
@ -788,15 +779,14 @@ jobs:
- name: Verify dotnet (higher version)
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns "^${{ matrix.lower-version }}$", "^${{ matrix.higher-version }}$"
test-sequential-version-installation-extended:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, macos-latest]
lower-version: ['6.0.425']
higher-version: ['8.0.403']
lower-version: ['8.0.403']
higher-version: ['9.0.301']
steps:
- name: Checkout
uses: actions/checkout@v4

View File

@ -19,28 +19,7 @@ jobs:
matrix:
operating-system:
[ubuntu-latest, ubuntu-22.04, windows-latest, macos-13, macos-latest]
dotnet-version: ['2.1', '2.2', '3.0', '3.1', '5.0', '6.0', '7.0', '8.0']
exclude:
- dotnet-version: '2.1'
operating-system: ubuntu-latest
- dotnet-version: '2.2'
operating-system: ubuntu-latest
- dotnet-version: '3.0'
operating-system: ubuntu-latest
- dotnet-version: '3.1'
operating-system: ubuntu-latest
- dotnet-version: '5.0'
operating-system: ubuntu-latest
- dotnet-version: '2.1'
operating-system: macos-latest
- dotnet-version: '2.2'
operating-system: macos-latest
- dotnet-version: '3.0'
operating-system: macos-latest
- dotnet-version: '3.1'
operating-system: macos-latest
- dotnet-version: '5.0'
operating-system: macos-latest
dotnet-version: ['6.0', '7.0', '8.0', '9.0']
steps:
- name: Checkout
uses: actions/checkout@v4