-
Notifications
You must be signed in to change notification settings - Fork 794
Fix GitHub Actions running in a PR by setting the correct branch #2057
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
Merged
jonathanslenders
merged 10 commits into
prompt-toolkit:main
from
tleonhardt:github-actions
Mar 17, 2026
+388
−259
Merged
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2147ddf
Fix GitHub Actions by setting correct branch
tleonhardt 696eeaa
Update GitHub Actions versions
tleonhardt 3e5f46d
Modify tests.yaml to use uv run instead of uvx
tleonhardt 48ecf01
Remove testing on Python 3.15-dev
tleonhardt 9e3d544
Try to fix readme-renderer
tleonhardt 0be1833
Try to run readme-renderer on Python 3.13
tleonhardt 90311d2
Remove outdated readme render check
tleonhardt ec42862
Add uv.lock to .gitignore and remove it from git
tleonhardt e16780d
Address most initial PR comments
tleonhardt b4d85dd
Add Makefile to .gitignore and "git rm Makefile"
tleonhardt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,31 @@ | ||
| repos: | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: "v6.0.0" | ||
| hooks: | ||
| - id: check-case-conflict | ||
| - id: check-executables-have-shebangs | ||
| - id: check-merge-conflict | ||
| - id: check-toml | ||
| - id: check-yaml | ||
|
jonathanslenders marked this conversation as resolved.
Outdated
|
||
| - id: detect-private-key | ||
| - id: end-of-file-fixer | ||
| - id: fix-byte-order-marker | ||
| - id: mixed-line-ending | ||
| - id: trailing-whitespace | ||
|
|
||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: "v0.15.6" | ||
| hooks: | ||
| - id: ruff-format | ||
| args: [--config=pyproject.toml] | ||
| - id: ruff-check | ||
| args: [--config=pyproject.toml, --fix, --exit-non-zero-on-fix] | ||
|
|
||
| - repo: https://github.com/crate-ci/typos | ||
| rev: v1.44.0 | ||
| hooks: | ||
| - id: typos | ||
| exclude: | | ||
| (?x)^( | ||
| tests/.* | ||
| )$ | ||
This file contains hidden or 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,100 @@ | ||
| # Simple Makefile for use with a uv-based development environment | ||
| # The at (@) prefix tells make to suppress output from the command | ||
| # The hyphen (-) prefix tells make to ignore errors (e.g., if a directory doesn't exist) | ||
|
|
||
| .PHONY: install | ||
| install: ## Install the virtual environment with dependencies | ||
| @echo "🚀 Creating uv Python virtual environment" | ||
| @uv python install 3.14 | ||
| @uv sync --python=3.14 | ||
| @echo "🚀 Installing Git prek hooks locally" | ||
| @uv run prek install -f | ||
|
|
||
| .PHONY: check | ||
| check: ## Run code quality tools. | ||
| @echo "🚀 Checking lock file consistency with 'pyproject.toml'" | ||
| @uv lock --locked | ||
| @echo "🚀 Auto-formatting/Linting code and documentation: Running prek" | ||
| @uv run prek run -a | ||
| @echo "🚀 Static type checking: Running mypy" | ||
| @uv run mypy | ||
|
|
||
| .PHONY: format | ||
| format: ## Perform ruff formatting | ||
| @uv run ruff format | ||
|
|
||
| .PHONY: lint | ||
| lint: ## Perform ruff linting | ||
| @uv run ruff check --fix | ||
|
|
||
| .PHONY: typecheck | ||
| typecheck: ## Perform type checking | ||
| @uv run mypy | ||
|
|
||
| .PHONY: test | ||
| test: ## Test the code with pytest. | ||
| @echo "🚀 Testing code: Running pytest" | ||
| @uv run python -Xutf8 -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests | ||
|
|
||
| # TODO Add stuff for building Sphinx docs | ||
|
|
||
| .PHONY: build | ||
| build: clean-build ## Build wheel file | ||
| @echo "🚀 Creating wheel file" | ||
| @uv build | ||
|
|
||
| .PHONY: tag | ||
|
tleonhardt marked this conversation as resolved.
Outdated
|
||
| tag: ## Add a Git tag and push it to origin with syntax: make tag TAG=tag_name | ||
| @echo "🚀 Creating git tag: ${TAG}" | ||
| @git tag -a ${TAG} -m "" | ||
| @echo "🚀 Pushing tag to origin: ${TAG}" | ||
| @git push origin ${TAG} | ||
|
|
||
| # Define variables for files/directories to clean | ||
| BUILD_DIRS = build dist *.egg-info | ||
| DOC_DIRS = build | ||
| MYPY_DIRS = .mypy_cache dmypy.json dmypy.sock | ||
| TEST_DIRS = .cache .pytest_cache htmlcov | ||
| TEST_FILES = .coverage coverage.xml | ||
|
|
||
| .PHONY: clean-build | ||
| clean-build: ## Clean build artifacts | ||
| @echo "🚀 Removing build artifacts" | ||
| @uv run python -c "import shutil; import os; [shutil.rmtree(d, ignore_errors=True) for d in '$(BUILD_DIRS)'.split() if os.path.isdir(d)]" | ||
|
|
||
| .PHONY: clean-docs | ||
| clean-docs: ## Clean documentation artifacts | ||
| @echo "🚀 Removing documentation artifacts" | ||
| @uv run python -c "import shutil; import os; [shutil.rmtree(d, ignore_errors=True) for d in '$(DOC_DIRS)'.split() if os.path.isdir(d)]" | ||
|
|
||
| .PHONY: clean-mypy | ||
| clean-mypy: ## Clean mypy artifacts | ||
| @echo "🚀 Removing mypy artifacts" | ||
| @uv run python -c "import shutil; import os; [shutil.rmtree(d, ignore_errors=True) for d in '$(MYPY_DIRS)'.split() if os.path.isdir(d)]" | ||
|
|
||
| .PHONY: clean-pycache | ||
| clean-pycache: ## Clean pycache artifacts | ||
| @echo "🚀 Removing pycache artifacts" | ||
| @-find . -type d -name "__pycache__" -exec rm -r {} + | ||
|
|
||
| .PHONY: clean-ruff | ||
| clean-ruff: ## Clean ruff artifacts | ||
| @echo "🚀 Removing ruff artifacts" | ||
| @uv run ruff clean | ||
|
|
||
| .PHONY: clean-test | ||
| clean-test: ## Clean test artifacts | ||
| @echo "🚀 Removing test artifacts" | ||
| @uv run python -c "import shutil; import os; [shutil.rmtree(d, ignore_errors=True) for d in '$(TEST_DIRS)'.split() if os.path.isdir(d)]" | ||
| @uv run python -c "from pathlib import Path; [Path(f).unlink(missing_ok=True) for f in '$(TEST_FILES)'.split()]" | ||
|
|
||
| .PHONY: clean | ||
| clean: clean-build clean-docs clean-mypy clean-pycache clean-ruff clean-test ## Clean all artifacts | ||
| @echo "🚀 Cleaned all artifacts" | ||
|
|
||
| .PHONY: help | ||
| help: | ||
| @uv run python -c "import re; \ | ||
| [[print(f'\033[36m{m[0]:<20}\033[0m {m[1]}') for m in re.findall(r'^([a-zA-Z_-]+):.*?## (.*)$$', open(makefile).read(), re.M)] for makefile in ('$(MAKEFILE_LIST)').strip().split()]" | ||
|
|
||
| .DEFAULT_GOAL := help | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -218,4 +218,3 @@ rather then inheriting from `Filter`. For instance: | |
| @Condition | ||
| def my_filter(); | ||
| return True # Or False | ||
|
|
||
This file contains hidden or 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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| See http://python-prompt-toolkit.readthedocs.io/en/stable/pages/tutorials/repl.html | ||
| See http://python-prompt-toolkit.readthedocs.io/en/stable/pages/tutorials/repl.html |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.