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