| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f72db17 commit d09bd5e
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | name: Validate Python e2e | |
| 2 | - on: | ||
| 2 | + on: | ||
| 3 | 3 | push: | |
| 4 | 4 | branches: | |
| 5 | 5 | - main | |
@@ -120,3 +120,30 @@ jobs: | |||
| 120 | 120 | - name: Run simple code | |
| 121 | 121 | run: python -c 'import math; print(math.factorial(5))' | |
| 122 | 122 | ||
| 123 | + setup-dev-version: | ||
| 124 | + name: Setup 3.9-dev ${{ matrix.os }} | ||
| 125 | + runs-on: ${{ matrix.os }} | ||
| 126 | + strategy: | ||
| 127 | + fail-fast: false | ||
| 128 | + matrix: | ||
| 129 | + os: [macos-latest, windows-latest, ubuntu-latest] | ||
| 130 | + steps: | ||
| 131 | + - name: Checkout | ||
| 132 | + uses: actions/checkout@v3 | ||
| 133 | + | ||
| 134 | + - name: setup-python 3.9-dev | ||
| 135 | + id: setup-python | ||
| 136 | + uses: ./ | ||
| 137 | + with: | ||
| 138 | + python-version: '3.9-dev' | ||
| 139 | + | ||
| 140 | + - name: Check python-path | ||
| 141 | + run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}' | ||
| 142 | + shell: bash | ||
| 143 | + | ||
| 144 | + - name: Validate version | ||
| 145 | + run: ${{ startsWith(steps.setup-python.outputs.python-version, '3.9.') }} | ||
| 146 | + shell: bash | ||
| 147 | + | ||
| 148 | + - name: Run simple code | ||
| 149 | + run: python -c 'import math; print(math.factorial(5))' | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -166,7 +166,7 @@ Check out our detailed guide on using [Python with GitHub Actions](https://help. | |||
| 166 | 166 | - For every minor version of Python, expect only the latest patch to be preinstalled. | |
| 167 | 167 | - If `3.8.1` is installed for example, and `3.8.2` is released, expect `3.8.1` to be removed and replaced by `3.8.2` in the tools cache. | |
| 168 | 168 | - If the exact patch version doesn't matter to you, specifying just the major and minor version will get you the latest preinstalled patch version. In the previous example, the version spec `3.8` will use the `3.8.2` Python version found in the cache. | |
| 169 | - - Use `-dev` instead of a patch number (e.g., `3.11-dev`) to install the latest release of a minor version, *alpha and beta releases included*. | ||
| 169 | + - Use `-dev` instead of a patch number (e.g., `3.11-dev`) to install the latest patch version release for a given minor version, *alpha and beta releases included*. | ||
| 170 | 170 | - Downloadable Python versions from GitHub Releases ([actions/python-versions](https://github.com/actions/python-versions/releases)). | |
| 171 | 171 | - All available versions are listed in the [version-manifest.json](https://github.com/actions/python-versions/blob/main/versions-manifest.json) file. | |
| 172 | 172 | - If there is a specific version of Python that is not available, you can open an issue here | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -64183,15 +64183,10 @@ function useCpythonVersion(version, architecture) { | |||
| 64183 | 64183 | }); | |
| 64184 | 64184 | } | |
| 64185 | 64185 | exports.useCpythonVersion = useCpythonVersion; | |
| 64186 | - /** Convert versions like `3.8-dev` to a version like `>= 3.8.0-a0`. */ | ||
| 64186 | + /** Convert versions like `3.8-dev` to a version like `~3.8.0-0`. */ | ||
| 64187 | 64187 | function desugarDevVersion(versionSpec) { | |
| 64188 | - if (versionSpec.endsWith('-dev')) { | ||
| 64189 | - const versionRoot = versionSpec.slice(0, -'-dev'.length); | ||
| 64190 | - return `>= ${versionRoot}.0-a0`; | ||
| 64191 | - } | ||
| 64192 | - else { | ||
| 64193 | - return versionSpec; | ||
| 64194 | - } | ||
| 64188 | + const devVersion = /^(\d+)\.(\d+)-dev$/; | ||
| 64189 | + return versionSpec.replace(devVersion, '~$1.$2.0-0'); | ||
| 64195 | 64190 | } | |
| 64196 | 64191 | /** Extracts python version from install path from hosted tool cache as described in README.md */ | |
| 64197 | 64192 | function versionFromPath(installDir) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -117,14 +117,10 @@ export async function useCpythonVersion( | |||
| 117 | 117 | return {impl: 'CPython', version: installed}; | |
| 118 | 118 | } | |
| 119 | 119 | ||
| 120 | - /** Convert versions like `3.8-dev` to a version like `>= 3.8.0-a0`. */ | ||
| 120 | + /** Convert versions like `3.8-dev` to a version like `~3.8.0-0`. */ | ||
| 121 | 121 | function desugarDevVersion(versionSpec: string) { | |
| 122 | - if (versionSpec.endsWith('-dev')) { | ||
| 123 | - const versionRoot = versionSpec.slice(0, -'-dev'.length); | ||
| 124 | - return `>= ${versionRoot}.0-a0`; | ||
| 125 | - } else { | ||
| 126 | - return versionSpec; | ||
| 127 | - } | ||
| 122 | + const devVersion = /^(\d+)\.(\d+)-dev$/; | ||
| 123 | + return versionSpec.replace(devVersion, '~$1.$2.0-0'); | ||
| 128 | 124 | } | |
| 129 | 125 | ||
| 130 | 126 | /** Extracts python version from install path from hosted tool cache as described in README.md */ | |
| Back | FazBrowse Home | New Git URL |
0 commit comments