Skip to content

Fix GitHub Actions running in a PR by setting the correct branch#2057

Open
tleonhardt wants to merge 10 commits intoprompt-toolkit:mainfrom
tleonhardt:github-actions
Open

Fix GitHub Actions running in a PR by setting the correct branch#2057
tleonhardt wants to merge 10 commits intoprompt-toolkit:mainfrom
tleonhardt:github-actions

Conversation

@tleonhardt
Copy link

The primary fix here is to change the branch name in .github/workflows/test.yaml from master to main.

However a general attempt at modernizing the overall CI/CD has been made.

Changes include:

  • Added .pre-commit-config.yaml and prek to automate checks easily locally via pre-commit hooks
  • Bumped minimum Python version to 3.10 as this is now the minimum supported
  • Added support for Python 3.14 and free-threaded variant
  • Added a Makefile to make local development a little easier
  • Added various dependency_groups to pyproject.toml

Closes #2056

The primary fix here is to change the branch name in .github/workflows/test.yaml from master to main.

However a general attempt at modernizing the overall CI/CD has been made.

Changes include:
- Added .pre-commit-config.yaml and prek to automate checks easily
- Bumped minimum Python version to 3.10
- Added support for Python 3.14, 3.15, and there free-threaded variants
- Added a Makefile to make dev a little easier
- Added various dependency_groups to pyproject.toml
As a library, this file shouldn't be committed
@tleonhardt
Copy link
Author

@jonathanslenders Hi Jonathan, thanks for creating an awesome library!

The main point of this PR is to fix the GitHub Actions running in a PR - it appears to have broken at some point when the default branch was renamed from master to main.

I took the liberty of providing a lot of other modernization in the process. If there is anything you don't agree with, please let me know and I'll be happy to roll that back.

@tleonhardt
Copy link
Author

@jonathanslenders Thanks for all of your great feedback. I think I've addressed all of your comments so far other than deleting the .pre-commit-config.yaml and Makefile. I'm personally a huge fan. But if you don't like them I'll remove those as well and if you are cool with it add them to the .gitignore so I can leave them on my machine.

But if you haven't tried it out before, I'd recommend giving the workflow a try. Prior to commits I'm accustomed to doing:

make check
make docs
make test

It lets me hop back and forth between projects without having to worry about the details of how to build documentation, run tests, and do quality checks for each project.

@tleonhardt
Copy link
Author

I deleted the Makefile and added that to the .gitignore. I think I have addressed all existing comments, including restoring the inadvertently deleted comments.

Please let me know if there are any other changes you would like.

@jonathanslenders
Copy link
Member

@tleonhardt: Thanks! All looks great now! I'll have a second look tomorrow with a fresh mind right before merging. (Just want to be sure not to miss anything.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitHub Actions not running in PRs

2 participants