-
-
Notifications
You must be signed in to change notification settings - Fork 128
Do less cding around in the third-party workflow
#637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e355354
12d0f93
03289b1
674907d
8b9d53e
a74a859
c241cbd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,14 +61,17 @@ jobs: | |
| with: | ||
| path: typing-extensions-latest | ||
| persist-credentials: false | ||
| - name: Add local version of typing_extensions as a dependency | ||
| run: cd pydantic; uv add --editable ../typing-extensions-latest | ||
| - name: Install pydantic test dependencies | ||
| run: cd pydantic; uv sync --group dev | ||
| - name: List installed dependencies | ||
| run: cd pydantic; uv pip list | ||
| - name: Run pydantic tests | ||
| run: cd pydantic; uv run pytest | ||
| - name: Run tests with typing_extensions main branch | ||
| working-directory: pydantic | ||
| run: | | ||
| uv add --editable ../typing-extensions-latest | ||
| uv sync --group dev | ||
|
|
||
| printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n" | ||
| uv pip list | ||
| printf "\n\n" | ||
|
|
||
| uv run pytest | ||
|
|
||
| typing_inspect: | ||
| name: typing_inspect tests | ||
|
|
@@ -91,19 +94,19 @@ jobs: | |
| with: | ||
| path: typing-extensions-latest | ||
| persist-credentials: false | ||
| - name: Install typing_inspect test dependencies | ||
| - name: Run tests with typing_extensions main branch | ||
| working-directory: typing_inspect | ||
| run: | | ||
| set -x | ||
| cd typing_inspect | ||
| uv venv .venv | ||
|
|
||
| uv pip install -r test-requirements.txt --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)" | ||
| - name: Install typing_extensions latest | ||
| run: cd typing_inspect; uv pip install "typing-extensions @ ../typing-extensions-latest" | ||
| - name: List all installed dependencies | ||
| run: cd typing_inspect; uv pip freeze | ||
| - name: Run typing_inspect tests | ||
| run: | | ||
| cd typing_inspect; uv run --no-project pytest | ||
| uv pip install -e "typing-extensions @ ../typing-extensions-latest" | ||
|
|
||
| printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n" | ||
| uv pip list | ||
|
|
||
| uv run --no-project pytest | ||
|
|
||
| pycroscope: | ||
| name: pycroscope tests | ||
|
|
@@ -126,19 +129,19 @@ jobs: | |
| with: | ||
| path: typing-extensions-latest | ||
| persist-credentials: false | ||
| - name: Install pycroscope test requirements | ||
| - name: Run tests with typing_extensions main branch | ||
| working-directory: pycroscope | ||
| run: | | ||
| set -x | ||
| cd pycroscope | ||
| uv venv .venv | ||
| uv pip install 'pycroscope[tests] @ .' --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)" | ||
| - name: Install typing_extensions latest | ||
| run: cd pycroscope; uv pip install "typing-extensions @ ../typing-extensions-latest" | ||
| - name: List all installed dependencies | ||
| run: cd pycroscope; uv pip freeze | ||
| - name: Run pycroscope tests | ||
| run: | | ||
| cd pycroscope; uv run --no-project pytest pycroscope/ | ||
|
|
||
| uv pip install -e 'pycroscope[tests] @ .' --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)" | ||
| uv pip install -e "typing-extensions @ ../typing-extensions-latest" | ||
|
|
||
| printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n" | ||
| uv pip list | ||
|
|
||
| uv run --no-project pytest pycroscope/ | ||
|
|
||
| typeguard: | ||
| name: typeguard tests | ||
|
|
@@ -161,20 +164,21 @@ jobs: | |
| with: | ||
| path: typing-extensions-latest | ||
| persist-credentials: false | ||
| - name: Install typeguard test requirements | ||
| - name: Run tests with typing_extensions main branch | ||
| env: | ||
| PYTHON_COLORS: 0 # A test fails if tracebacks are colorized | ||
| working-directory: typeguard | ||
| run: | | ||
| set -x | ||
| cd typeguard | ||
| uv venv .venv | ||
| uv pip install "typeguard @ ." --group test --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)" | ||
| - name: Install typing_extensions latest | ||
| run: cd typeguard; uv pip install "typing-extensions @ ../typing-extensions-latest" | ||
| - name: List all installed dependencies | ||
| run: cd typeguard; uv pip freeze | ||
| - name: Run typeguard tests | ||
| run: | | ||
| export PYTHON_COLORS=0 # A test fails if tracebacks are colorized | ||
| cd typeguard; uv run --no-project pytest | ||
|
|
||
| uv pip install -e "typeguard @ ." --group test --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)" | ||
| uv pip install -e "typing-extensions @ ../typing-extensions-latest" | ||
|
|
||
| printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n" | ||
| uv pip list | ||
|
|
||
| uv run --no-project pytest | ||
|
|
||
| typed-argument-parser: | ||
| name: typed-argument-parser tests | ||
|
|
@@ -203,20 +207,20 @@ jobs: | |
| run: | | ||
| git config --global user.email "[email protected]" | ||
| git config --global user.name "Your Name" | ||
| - name: Install typed-argument-parser test requirements | ||
| - name: Run tests with typing_extensions main branch | ||
| working-directory: typed-argument-parser | ||
| run: | | ||
| set -x | ||
| cd typed-argument-parser | ||
| uv venv .venv | ||
| uv pip install "typed-argument-parser @ ." --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)" | ||
|
|
||
| uv pip install -e "typed-argument-parser @ ." --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)" | ||
| uv pip install pytest --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)" | ||
| - name: Install typing_extensions latest | ||
| run: cd typed-argument-parser; uv pip install "typing-extensions @ ../typing-extensions-latest" | ||
| - name: List all installed dependencies | ||
| run: cd typed-argument-parser; uv pip freeze | ||
| - name: Run typed-argument-parser tests | ||
| run: | | ||
| cd typed-argument-parser; uv run --no-project pytest | ||
| uv pip install -e "typing-extensions @ ../typing-extensions-latest" | ||
|
|
||
| printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n" | ||
| uv pip list | ||
|
|
||
| uv run --no-project pytest | ||
|
|
||
| mypy: | ||
| name: stubtest & mypyc tests | ||
|
|
@@ -239,20 +243,20 @@ jobs: | |
| with: | ||
| path: typing-extensions-latest | ||
| persist-credentials: false | ||
| - name: Install mypy test requirements | ||
| - name: Run tests with typing_extensions main branch | ||
| working-directory: mypy | ||
| run: | | ||
| set -x | ||
| cd mypy | ||
| uv venv .venv | ||
|
|
||
| uv pip install -r test-requirements.txt --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)" | ||
| uv pip install -e . | ||
| - name: Install typing_extensions latest | ||
| run: cd mypy; uv pip install "typing-extensions @ ../typing-extensions-latest" | ||
| - name: List all installed dependencies | ||
| run: cd mypy; uv pip freeze | ||
| - name: Run stubtest & mypyc tests | ||
| run: | | ||
| cd mypy; uv run --no-project pytest -n 2 ./mypy/test/teststubtest.py ./mypyc/test/test_run.py ./mypyc/test/test_external.py | ||
| uv pip install -e "typing_extensions @ ../typing-extensions-latest" | ||
|
|
||
| printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n" | ||
| uv pip list | ||
|
|
||
| uv run --no-project pytest -n 2 ./mypy/test/teststubtest.py ./mypyc/test/test_run.py ./mypyc/test/test_external.py | ||
|
|
||
| cattrs: | ||
| name: cattrs tests | ||
|
|
@@ -275,14 +279,17 @@ jobs: | |
| with: | ||
| path: typing-extensions-latest | ||
| persist-credentials: false | ||
| - name: Add local version of typing_extensions as a dependency | ||
| run: cd cattrs; uv add --editable ../typing-extensions-latest | ||
| - name: Install test dependencies | ||
| run: cd cattrs; uv sync --group test --all-extras | ||
| - name: List installed dependencies | ||
| run: cd cattrs; uv pip list | ||
| - name: Run tests | ||
| run: cd cattrs; uv run pytest tests | ||
| - name: Run tests with typing_extensions main branch | ||
| working-directory: cattrs | ||
| run: | | ||
| uv add --editable ../typing-extensions-latest | ||
| uv sync --group test --all-extras | ||
|
|
||
| printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n" | ||
| uv pip list | ||
| printf "\n\n" | ||
|
|
||
| uv run pytest tests | ||
|
|
||
| sqlalchemy: | ||
| name: sqlalchemy tests | ||
|
|
@@ -310,12 +317,14 @@ jobs: | |
| with: | ||
| path: typing-extensions-latest | ||
| persist-credentials: false | ||
| - name: Run sqlalchemy tests | ||
| - name: Run sqlalchemy tests with typing_extensions main branch | ||
| working-directory: sqlalchemy | ||
| run: | | ||
| cd sqlalchemy | ||
| uvx --with setuptools tox -e github-nocext \ | ||
| --force-dep "typing-extensions @ file://$(pwd)/../typing-extensions-latest" \ | ||
| -- -q --nomemory --notimingintensive | ||
| set -x | ||
|
|
||
| uvx \ | ||
| --with=setuptools \ | ||
| tox -e github-nocext --force-dep="typing-extensions @ file://$(pwd)/../typing-extensions-latest" -- -q --nomemory --notimingintensive | ||
|
|
||
|
|
||
| litestar: | ||
|
|
@@ -339,9 +348,21 @@ jobs: | |
| with: | ||
| path: typing-extensions-latest | ||
| persist-credentials: false | ||
| - name: Run litestar tests | ||
| run: uv run --with=../typing-extensions-latest -- python -m pytest tests/unit/test_typing.py tests/unit/test_dto | ||
| - name: Run litestar tests with typing_extensions main branch | ||
| working-directory: litestar | ||
| run: | | ||
| # litestar's python-requires means uv won't let us add typing-extensions-latest | ||
| # as a requirement unless we do this | ||
| sed -i 's/^requires-python = ">=3.8/requires-python = ">=3.9/' pyproject.toml | ||
|
|
||
| uv add --editable ../typing-extensions-latest | ||
| uv sync | ||
|
|
||
| printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n" | ||
| uv pip list | ||
| printf "\n\n" | ||
|
|
||
| uv run python -m pytest tests/unit/test_typing.py tests/unit/test_dto | ||
|
Comment on lines
-342
to
+365
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the old invocation here meant that the typing_extensions Everything was probably working okay here? But it seems fragile, and it's hard to verify that we were actually using the |
||
|
|
||
| create-issue-on-failure: | ||
| name: Create an issue if daily tests failed | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we know
uv runwon't install a different version of typing-extensions?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
uv addcommand a few lines above modifies the pyproject.toml file to specify that the project depends on an editable install of our checkout of the typing_extensionsmainbranch. So if uv did an implicit sync as part of theuv runcommand (which you're right, it often does), all it would do as part of that sync is check that the editable install of typing_extensions in the virtual environment points to the directory specified in the pyproject.toml file