mirror of
https://github.com/actions/setup-dotnet.git
synced 2024-11-22 19:41:08 +07:00
Add unit and e2e tests
This commit is contained in:
parent
aa34a3ceaa
commit
5f570676c2
24
.github/workflows/e2e-tests.yml
vendored
24
.github/workflows/e2e-tests.yml
vendored
@ -165,6 +165,30 @@ jobs:
|
|||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: __tests__/verify-dotnet.ps1 3.1 2.2
|
run: __tests__/verify-dotnet.ps1 3.1 2.2
|
||||||
|
|
||||||
|
test-setup-with-ABCxx-syntax:
|
||||||
|
runs-on: ${{ matrix.operating-system }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Clear toolcache
|
||||||
|
shell: pwsh
|
||||||
|
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
|
||||||
|
- name: Setup dotnet '3.1.1xx'
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
dotnet-version: '3.1.1xx'
|
||||||
|
- name: Setup dotnet '6.0.3xx'
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
dotnet-version: '6.0.3xx'
|
||||||
|
- name: Verify dotnet
|
||||||
|
shell: pwsh
|
||||||
|
run: __tests__/verify-dotnet.ps1 3.1.1 6.0.3
|
||||||
|
|
||||||
test-setup-global-json-specified-and-version:
|
test-setup-global-json-specified-and-version:
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.operating-system }}
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -201,6 +201,7 @@ describe('DotnetVersionResolver tests', () => {
|
|||||||
'.2.3',
|
'.2.3',
|
||||||
'.2.x',
|
'.2.x',
|
||||||
'*.',
|
'*.',
|
||||||
|
'*',
|
||||||
'1.2.',
|
'1.2.',
|
||||||
'1.2.-abc',
|
'1.2.-abc',
|
||||||
'a.b',
|
'a.b',
|
||||||
@ -221,7 +222,7 @@ describe('DotnetVersionResolver tests', () => {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
each(['3.1', '3.1.x', '3.1.*', '3.1.X']).test(
|
each(['3.1', '3.1.x', '3.1.*', '3.1.X', '3.1.1xx']).test(
|
||||||
"if version: '%s' that can be resolved to 'channel' option is supplied, it should set type to 'channel' in version object",
|
"if version: '%s' that can be resolved to 'channel' option is supplied, it should set type to 'channel' in version object",
|
||||||
async version => {
|
async version => {
|
||||||
const dotnetVersionResolver = new installer.DotnetVersionResolver(
|
const dotnetVersionResolver = new installer.DotnetVersionResolver(
|
||||||
@ -233,7 +234,7 @@ describe('DotnetVersionResolver tests', () => {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
each(['6.0', '6.0.x', '6.0.*', '6.0.X']).test(
|
each(['6.0', '6.0.x', '6.0.*', '6.0.X', '6.0.1xx']).test(
|
||||||
"if version: '%s' that can be resolved to 'channel' option is supplied and its major tag is >= 6, it should set type to 'channel' and qualityFlag to 'true' in version object",
|
"if version: '%s' that can be resolved to 'channel' option is supplied and its major tag is >= 6, it should set type to 'channel' and qualityFlag to 'true' in version object",
|
||||||
async version => {
|
async version => {
|
||||||
const dotnetVersionResolver = new installer.DotnetVersionResolver(
|
const dotnetVersionResolver = new installer.DotnetVersionResolver(
|
||||||
|
Loading…
Reference in New Issue
Block a user