-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35d8269
commit 22b9795
Showing
9 changed files
with
115 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,10 +62,29 @@ jobs: | |
done | ||
exit 1 | ||
shell: bash | ||
- name: Setup python for tox | ||
uses: actions/setup-python@v5 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install the latest version of uv | ||
uses: astral-sh/setup-uv@v3 | ||
with: | ||
python-version: "3.12" | ||
enable-cache: true | ||
cache-dependency-glob: "pyproject.toml" | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Add .local/bin to PATH Windows | ||
if: runner.os == 'Windows' | ||
shell: bash | ||
run: echo "$USERPROFILE/.local/bin" >> $GITHUB_PATH | ||
- name: Add .local/bin to PATH macos-13 | ||
if: matrix.os == 'macos-13' | ||
shell: bash | ||
run: echo ~/.local/bin >> $GITHUB_PATH | ||
- name: Install tox | ||
if: matrix.py == '3.13' | ||
run: uv tool install --python-preference only-managed --python 3.12 tox --with tox-uv | ||
- name: Install tox | ||
if: matrix.py != '3.13' | ||
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv | ||
- name: Setup brew python for test ${{ matrix.py }} | ||
if: startsWith(matrix.py,'brew@') | ||
run: | | ||
|
@@ -74,37 +93,18 @@ jobs: | |
brew cleanup && brew upgrade python@$PY || brew install python@$PY | ||
echo "/usr/local/opt/python@$PY/libexec/bin" >>"${GITHUB_PATH}" | ||
shell: bash | ||
- name: Install tox-uv | ||
run: python -m pip install tox-uv pip -U | ||
if: "!(startsWith(matrix.py,'pypy') || matrix.py == '3.7' || matrix.py == '[email protected]' || matrix.py == '[email protected]')" | ||
- name: Install tox | ||
run: python -m pip install tox pip -U | ||
if: "(startsWith(matrix.py,'pypy') || matrix.py == '3.7' || matrix.py == '[email protected]' || matrix.py == '[email protected]')" | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Use local virtualenv for tox | ||
run: python -m pip install . | ||
- name: Setup python for test ${{ matrix.py }} | ||
if: "!( startsWith(matrix.py,'brew@') || endsWith(matrix.py, '-dev') )" | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.py }} | ||
allow-prereleases: true | ||
- name: Pick environment to run | ||
run: | | ||
import os; import platform; import sys; from pathlib import Path | ||
plat = platform.python_implementation() | ||
e = f"3.{sys.version_info.minor}" if plat == "CPython" else f"pypy3{sys.version_info.minor}" | ||
env = f"TOXENV={e}" | ||
print(f"Picked: {env} for {sys.version} based of {sys.executable}") | ||
with Path(os.environ["GITHUB_ENV"]).open("ta") as file_handler: | ||
file_handler.write(env) | ||
shell: python | ||
run: python tasks/pick_tox_env.py ${{ matrix.py }} | ||
- name: Setup test suite | ||
run: tox -vv --notest --skip-missing-interpreters false | ||
run: tox run -vv --notest --skip-missing-interpreters false | ||
- name: Run test suite | ||
run: tox --skip-pkg-install | ||
run: tox run --skip-pkg-install | ||
timeout-minutes: 20 | ||
env: | ||
PYTEST_ADDOPTS: "-vv --durations=20" | ||
|
@@ -134,15 +134,19 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Python "3.12" | ||
uses: actions/setup-python@v5 | ||
- name: Install the latest version of uv | ||
uses: astral-sh/setup-uv@v3 | ||
with: | ||
python-version: "3.12" | ||
enable-cache: true | ||
cache-dependency-glob: "pyproject.toml" | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Add .local/bin to Windows PATH | ||
if: runner.os == 'Windows' | ||
shell: bash | ||
run: echo "$USERPROFILE/.local/bin" >> $GITHUB_PATH | ||
- name: Install tox | ||
run: python -m pip install tox-uv | ||
- name: Setup check | ||
run: python -m tox --skip-missing-interpreters false -e ${{ matrix.tox_env }} --notest | ||
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv | ||
- name: Setup check suite | ||
run: tox r -vv --notest --skip-missing-interpreters false -e ${{ matrix.tox_env }} | ||
- name: Run check for ${{ matrix.tox_env }} | ||
run: python -m tox --skip-pkg-install -e ${{ matrix.tox_env }} | ||
env: | ||
UPGRADE_ADVISORY: "yes" | ||
run: tox r --skip-pkg-install -e ${{ matrix.tox_env }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Release to PyPI | ||
on: | ||
push: | ||
tags: ["*"] | ||
|
||
env: | ||
dists-artifact-name: python-package-distributions | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install the latest version of uv | ||
uses: astral-sh/setup-uv@v3 | ||
with: | ||
enable-cache: true | ||
cache-dependency-glob: "pyproject.toml" | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build package | ||
run: uv build --python 3.13 --python-preference only-managed --sdist --wheel . --out-dir dist | ||
- name: Store the distribution packages | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.dists-artifact-name }} | ||
path: dist/* | ||
|
||
release: | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: release | ||
url: https://pypi.org/project/virtualenv/${{ github.ref_name }} | ||
permissions: | ||
id-token: write | ||
steps: | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ env.dists-artifact-name }} | ||
path: dist/ | ||
- name: Publish to PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
attestations: true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Upgrade embedded wheels: setuptools to ``75.1.0`` from ``74.1.2`` - by :user:`gaborbernat`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file renamed
BIN
+1.2 MB
.../embed/setuptools-74.1.2-py3-none-any.whl → .../embed/setuptools-75.1.0-py3-none-any.whl
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from __future__ import annotations | ||
|
||
import os | ||
import sys | ||
from pathlib import Path | ||
|
||
py = sys.argv[1] | ||
if py.startswith("brew@"): | ||
py = py[len("brew@") :] | ||
env = f"TOXENV={py}" | ||
with Path(os.environ["GITHUB_ENV"]).open("ta", encoding="utf-8") as file_handler: | ||
file_handler.write(env) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters