mirror of
https://github.com/actions/setup-dotnet.git
synced 2024-11-22 11:31:07 +07:00
Update unit tests
This commit is contained in:
parent
34c30d0e81
commit
7358a44590
6
.github/workflows/e2e-tests.yml
vendored
6
.github/workflows/e2e-tests.yml
vendored
@ -177,17 +177,17 @@ jobs:
|
||||
- name: Clear toolcache
|
||||
shell: pwsh
|
||||
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
|
||||
- name: Setup dotnet '5.0.1xx'
|
||||
- name: Setup dotnet '5.0.2xx'
|
||||
uses: ./
|
||||
with:
|
||||
dotnet-version: '5.0.1xx'
|
||||
dotnet-version: '5.0.2xx'
|
||||
- name: Setup dotnet '7.0.1xx'
|
||||
uses: ./
|
||||
with:
|
||||
dotnet-version: '7.0.1xx'
|
||||
- name: Verify dotnet
|
||||
shell: pwsh
|
||||
run: __tests__/verify-dotnet.ps1 5.0.1 7.0.1
|
||||
run: __tests__/verify-dotnet.ps1 5.0.2 7.0.1
|
||||
|
||||
test-setup-global-json-specified-and-version:
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
|
3
dist/index.js
vendored
3
dist/index.js
vendored
@ -290,9 +290,10 @@ class DotnetVersionResolver {
|
||||
this.resolvedArgument.value = yield this.getLatestByMajorTag(major);
|
||||
}
|
||||
else {
|
||||
// Resolve LTS version of .NET if "dotnet-version" is specified as *, x or X
|
||||
this.resolvedArgument.value = 'LTS';
|
||||
}
|
||||
this.resolvedArgument.qualityFlag = +major >= 6 ? true : false;
|
||||
this.resolvedArgument.qualityFlag = parseInt(major) >= 6 ? true : false;
|
||||
});
|
||||
}
|
||||
createDotNetVersion() {
|
||||
|
@ -70,9 +70,10 @@ export class DotnetVersionResolver {
|
||||
} else if (this.isNumericTag(major)) {
|
||||
this.resolvedArgument.value = await this.getLatestByMajorTag(major);
|
||||
} else {
|
||||
// Resolve LTS version of .NET if "dotnet-version" is specified as *, x or X
|
||||
this.resolvedArgument.value = 'LTS';
|
||||
}
|
||||
this.resolvedArgument.qualityFlag = +major >= 6 ? true : false;
|
||||
this.resolvedArgument.qualityFlag = parseInt(major) >= 6 ? true : false;
|
||||
}
|
||||
|
||||
public async createDotNetVersion(): Promise<DotnetVersion> {
|
||||
|
Loading…
Reference in New Issue
Block a user