You've already forked setup-python
							
							
				mirror of
				https://github.com/actions/setup-python.git
				synced 2025-10-31 23:26:24 +07:00 
			
		
		
		
	Install multiple python versions (#567)
This commit is contained in:
		
							
								
								
									
										31
									
								
								.github/workflows/test-python.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										31
									
								
								.github/workflows/test-python.yml
									
									
									
									
										vendored
									
									
								
							| @ -191,8 +191,35 @@ jobs: | ||||
|       - name: Validate version | ||||
|         run: | | ||||
|           $pythonVersion = (python --version) | ||||
|           if ("$pythonVersion" -NotMatch "${{ matrix.python }}"){ | ||||
|             Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}" | ||||
|           if ("$pythonVersion" -NotMatch "${{ matrix.python-version }}"){ | ||||
|             Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python-version }}" | ||||
|             exit 1 | ||||
|           } | ||||
|           $pythonVersion | ||||
|         shell: pwsh | ||||
|  | ||||
|   setup-python-multiple-python-versions: | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     strategy: | ||||
|       fail-fast: false | ||||
|       matrix: | ||||
|         os: [ubuntu-latest, windows-latest, macos-latest] | ||||
|     steps: | ||||
|       - uses: actions/checkout@v3 | ||||
|       - name: Setup Python and check latest | ||||
|         uses: ./ | ||||
|         with: | ||||
|           python-version: | | ||||
|               3.7 | ||||
|               3.8 | ||||
|               3.9 | ||||
|               3.10 | ||||
|           check-latest: true | ||||
|       - name: Validate version | ||||
|         run: | | ||||
|           $pythonVersion = (python --version) | ||||
|           if ("$pythonVersion" -NotMatch "3.10"){ | ||||
|             Write-Host "The current version is $pythonVersion; expected version is 3.10" | ||||
|             exit 1 | ||||
|           } | ||||
|           $pythonVersion | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Dmitry Shibanov
					Dmitry Shibanov