https://github.com/laurencerawlings/python-poetry-cicd
Python Poetry package with basic CI/CD using GitHub actions
https://github.com/laurencerawlings/python-poetry-cicd
black cd ci conventional-commits poetry pre-commit pypi pytest python
Last synced: about 2 months ago
JSON representation
Python Poetry package with basic CI/CD using GitHub actions
- Host: GitHub
- URL: https://github.com/laurencerawlings/python-poetry-cicd
- Owner: LaurenceRawlings
- License: mit
- Created: 2022-01-25T17:36:23.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-26T16:27:59.000Z (over 3 years ago)
- Last Synced: 2025-05-12T01:54:21.332Z (about 2 months ago)
- Topics: black, cd, ci, conventional-commits, poetry, pre-commit, pypi, pytest, python
- Language: Python
- Homepage:
- Size: 35.2 KB
- Stars: 5
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Python Poetry CI/CD
Python Poetry package with basic CI/CD using GitHub actions
## Usage
- Make new repo with this template
- Add `PERSONAL_ACCESS_TOKEN` and `PYPI_TOKEN` secrets
- Clone your new repo
- [optional] Install recommended VScode extensions
- Install dependencies and update python interpreter path```bash
poetry install
poetry run pre-commit install
poetry env info
```- Create a new branch to start development
```bash
git branch
git checkout
```- Replace all occurances of `application` with the name of your package
- `pyproject.toml`
- `.github/workflows/deploy.yml`
- `application/__main__py`
- `application` - directory
- (tip) In VScode use `Ctrl+Shift+F`
- Check the tests are passing before commiting```bash
poetry run pytest
```- Commit your changes usig the [conventional commits](https://www.conventionalcommits.org/) format
- (tip) use the VScode [Conventional Commits](https://marketplace.visualstudio.com/items?itemName=vivaxy.vscode-conventional-commits) extension to help```bash
git add .
git commit
```- Push your changes to GitHub
```bash
git push
```- Go to your newly created branch on GitHub and create pull request
- Wait for checks to pass from the CI workflow
- Merge pull request after all the checks have passed
- Now back on the `main` branch more workflows should start
- Wait for all the workflows to finish and go to `/releases`
- Review the release draft and publish when ready