Update e2e tests

This commit is contained in:
IvanZosimov
2023-04-13 17:28:59 +02:00
parent 920b830bd1
commit b72f430d36
6 changed files with 123 additions and 113 deletions

View File

@ -33,7 +33,7 @@ jobs:
3.0.x
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 2.2.402 3.1.404 '3.0'
run: __tests__/verify-dotnet.ps1 -Patterns 2.2.402, 3.1.404, 3.0
test-setup-full-version:
runs-on: ${{ matrix.operating-system }}
@ -60,13 +60,9 @@ jobs:
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: NOTATOKEN
- name: Verify nuget config file
shell: pwsh
run: |
if (-Not (Test-Path "../nuget.config")) { throw "nuget file not generated correctly" }
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 3.1.201 2.2.402
run: __tests__/verify-dotnet.ps1 -Patterns 3.1.201, 2.2.402 -CheckNugetConfig
test-setup-without-patch-version:
runs-on: ${{ matrix.operating-system }}
@ -91,7 +87,7 @@ jobs:
dotnet-version: '2.2'
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 3.1 2.2
run: __tests__/verify-dotnet.ps1 -Patterns 3.1, 2.2
test-setup-prerelease-version:
runs-on: ${{ matrix.operating-system }}
@ -105,17 +101,13 @@ jobs:
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet '2.2'
uses: ./
with:
dotnet-version: '2.2'
- name: Setup dotnet '3.1.100-preview1-014459'
uses: ./
with:
dotnet-version: '3.1.100-preview1-014459'
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 3.1.100-preview1-014459
run: __tests__/verify-dotnet.ps1 -Patterns 3.1.100-preview1-014459
test-setup-latest-patch-version:
runs-on: ${{ matrix.operating-system }}
@ -139,7 +131,7 @@ jobs:
dotnet-version: 2.2.X
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 '2.2' '3.1'
run: __tests__/verify-dotnet.ps1 -Patterns 2.2, 3.1
test-setup-with-wildcard:
runs-on: ${{ matrix.operating-system }}
@ -163,7 +155,7 @@ jobs:
dotnet-version: 2.2.*
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 3.1 2.2
run: __tests__/verify-dotnet.ps1 -Patterns 3.1, 2.2
test-setup-global-json-specified-and-version:
runs-on: ${{ matrix.operating-system }}
@ -181,7 +173,7 @@ jobs:
shell: bash
run: |
mkdir subdirectory
echo '{"sdk":{"version": "2.2","rollForward": "latestFeature"}}' > ./subdirectory/global.json
echo '{"sdk":{"version": "2.2.207","rollForward": "latestFeature"}}' > ./subdirectory/global.json
- name: Setup dotnet
uses: ./
with:
@ -189,7 +181,7 @@ jobs:
global-json-file: ./subdirectory/global.json
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 2.2 3.1
run: __tests__/verify-dotnet.ps1 -Patterns 2.2.207, 3.1
test-setup-with-dotnet-quality:
runs-on: ${{ matrix.operating-system }}
@ -209,12 +201,9 @@ jobs:
with:
dotnet-version: '7.0'
dotnet-quality: 'preview'
- name: Verify preview version
- name: Verify dotnet
shell: pwsh
run: |
$version = & dotnet --version
Write-Host "Installed version: $version"
if (-not ($version.Contains("preview") -or $version.Contains("rc"))) { throw "Unexpected version" }
run: __tests__/verify-dotnet.ps1 -Patterns 7.0 -ContainedPattern "preview"
test-dotnet-version-output-during-single-version-installation:
runs-on: ${{ matrix.operating-system }}
@ -300,7 +289,8 @@ jobs:
env:
NUGET_AUTH_TOKEN: NOTATOKEN
- name: Verify dotnet
run: __tests__/verify-dotnet.sh 3.1.201
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns 3.1.201 -CheckNugetConfig
test-bypass-proxy:
runs-on: ubuntu-latest
@ -320,4 +310,5 @@ jobs:
env:
NUGET_AUTH_TOKEN: NOTATOKEN
- name: Verify dotnet
run: __tests__/verify-dotnet.sh 3.1.201
shell: pwsh
run: __tests__/verify-dotnet.ps1 -Patterns 3.1.201 -CheckNugetConfig