Skip to content

Commit

Permalink
Update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanZosimov committed Apr 12, 2023
1 parent 34c30d0 commit 7358a44
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 2 additions & 1 deletion src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down

0 comments on commit 7358a44

Please sign in to comment.