mirror of
				https://gitea.com/actions/setup-python.git
				synced 2025-11-04 13:48:55 +08:00 
			
		
		
		
	Compare commits
	
		
			4 Commits
		
	
	
		
			v1.2.2
			...
			releases/v
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					0cf603f701 | ||
| 
						 | 
					0f07f7f756 | ||
| 
						 | 
					9f3aa2c73d | ||
| 
						 | 
					152ba7c4dd | 
							
								
								
									
										28
									
								
								.github/workflows/release-new-action-version.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								.github/workflows/release-new-action-version.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
				
			|||||||
 | 
					name: Release new action version
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  release:
 | 
				
			||||||
 | 
					    types: [released]
 | 
				
			||||||
 | 
					  workflow_dispatch:
 | 
				
			||||||
 | 
					    inputs:
 | 
				
			||||||
 | 
					      TAG_NAME:
 | 
				
			||||||
 | 
					        description: 'Tag name that the major tag will point to'
 | 
				
			||||||
 | 
					        required: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					env:
 | 
				
			||||||
 | 
					  TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
 | 
				
			||||||
 | 
					permissions:
 | 
				
			||||||
 | 
					  contents: write
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  update_tag:
 | 
				
			||||||
 | 
					    name: Update the major tag to include the ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} changes
 | 
				
			||||||
 | 
					    environment:
 | 
				
			||||||
 | 
					      name: releaseNewActionVersion
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - name: Update the ${{ env.TAG_NAME }} tag
 | 
				
			||||||
 | 
					        uses: actions/publish-action@v0.2.2
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          source-tag: ${{ env.TAG_NAME }}
 | 
				
			||||||
 | 
					          slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
 | 
				
			||||||
							
								
								
									
										77
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,77 @@
 | 
				
			|||||||
 | 
					name: Validate 'setup-python'
 | 
				
			||||||
 | 
					on: 
 | 
				
			||||||
 | 
					  pull_request:
 | 
				
			||||||
 | 
					    paths-ignore:
 | 
				
			||||||
 | 
					      - '**.md'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  default-version:
 | 
				
			||||||
 | 
					    name: Setup default version
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      fail-fast: false
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-20.04]
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - name: setup default python 
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - name: Validate version
 | 
				
			||||||
 | 
					      run: python --version
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - name: Run simple python code
 | 
				
			||||||
 | 
					      run: python -c 'import math; print(math.factorial(5))'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  setup-python:
 | 
				
			||||||
 | 
					    name: Setup ${{ matrix.python }} ${{ matrix.os }}
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      fail-fast: false
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-20.04]
 | 
				
			||||||
 | 
					        python: [3.5, 3.6, 3.7, 3.8, 3.9]
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - name: setup-python ${{ matrix.python }}
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        python-version: ${{ matrix.python }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - name: Validate version
 | 
				
			||||||
 | 
					      run: |
 | 
				
			||||||
 | 
					        $pythonVersion = (python --version)
 | 
				
			||||||
 | 
					        if ("$pythonVersion" -notlike "Python ${{ matrix.python }}.*"){
 | 
				
			||||||
 | 
					          Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}"
 | 
				
			||||||
 | 
					          exit 1
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        $pythonVersion
 | 
				
			||||||
 | 
					      shell: pwsh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - name: Run simple code
 | 
				
			||||||
 | 
					      run: python -c 'import math; print(math.factorial(5))'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  setup-pypy:
 | 
				
			||||||
 | 
					    name: Setup PyPy ${{ matrix.os }}
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      fail-fast: false
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-20.04]
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - name: setup-python pypy3
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        python-version: 'pypy3'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - name: setup-python pypy2
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        python-version: 'pypy2'
 | 
				
			||||||
							
								
								
									
										2124
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2124
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										28
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										28
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@@ -5,9 +5,28 @@
 | 
				
			|||||||
  "requires": true,
 | 
					  "requires": true,
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
    "@actions/core": {
 | 
					    "@actions/core": {
 | 
				
			||||||
      "version": "1.2.6",
 | 
					      "version": "1.10.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz",
 | 
				
			||||||
      "integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA=="
 | 
					      "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==",
 | 
				
			||||||
 | 
					      "requires": {
 | 
				
			||||||
 | 
					        "@actions/http-client": "^2.0.1",
 | 
				
			||||||
 | 
					        "uuid": "^8.3.2"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      "dependencies": {
 | 
				
			||||||
 | 
					        "@actions/http-client": {
 | 
				
			||||||
 | 
					          "version": "2.1.0",
 | 
				
			||||||
 | 
					          "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.0.tgz",
 | 
				
			||||||
 | 
					          "integrity": "sha512-BonhODnXr3amchh4qkmjPMUO8mFi/zLaaCeCAJZqch8iQqyDnVIkySjB38VHAC8IJ+bnlgfOqlhpyCUZHlQsqw==",
 | 
				
			||||||
 | 
					          "requires": {
 | 
				
			||||||
 | 
					            "tunnel": "^0.0.6"
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        "uuid": {
 | 
				
			||||||
 | 
					          "version": "8.3.2",
 | 
				
			||||||
 | 
					          "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
 | 
				
			||||||
 | 
					          "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "@actions/exec": {
 | 
					    "@actions/exec": {
 | 
				
			||||||
      "version": "1.0.3",
 | 
					      "version": "1.0.3",
 | 
				
			||||||
@@ -4543,8 +4562,7 @@
 | 
				
			|||||||
    "tunnel": {
 | 
					    "tunnel": {
 | 
				
			||||||
      "version": "0.0.6",
 | 
					      "version": "0.0.6",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
 | 
				
			||||||
      "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
 | 
					      "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
 | 
				
			||||||
      "dev": true
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "tunnel-agent": {
 | 
					    "tunnel-agent": {
 | 
				
			||||||
      "version": "0.6.0",
 | 
					      "version": "0.6.0",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -23,7 +23,7 @@
 | 
				
			|||||||
  "author": "GitHub",
 | 
					  "author": "GitHub",
 | 
				
			||||||
  "license": "MIT",
 | 
					  "license": "MIT",
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
    "@actions/core": "^1.2.6",
 | 
					    "@actions/core": "^1.10.0",
 | 
				
			||||||
    "semver": "^7.1.3"
 | 
					    "semver": "^7.1.3"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "devDependencies": {
 | 
					  "devDependencies": {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -80,6 +80,10 @@ function usePyPy(
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  core.addPath(installDir);
 | 
					  core.addPath(installDir);
 | 
				
			||||||
  core.addPath(_binDir);
 | 
					  core.addPath(_binDir);
 | 
				
			||||||
 | 
					  // Starting from PyPy 7.3.1, the folder that is used for pip and anything that pip installs should be "Scripts" on Windows.
 | 
				
			||||||
 | 
					  if (IS_WINDOWS) {
 | 
				
			||||||
 | 
					    core.addPath(path.join(installDir, 'Scripts'));
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const impl = 'pypy' + majorVersion.toString();
 | 
					  const impl = 'pypy' + majorVersion.toString();
 | 
				
			||||||
  core.setOutput('python-version', impl);
 | 
					  core.setOutput('python-version', impl);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user