https://github.com/devbruce/poetry-build-action
GitHub Action: Building & Caching poetry environment directly
https://github.com/devbruce/poetry-build-action
ci github-action poetry python
Last synced: 3 months ago
JSON representation
GitHub Action: Building & Caching poetry environment directly
- Host: GitHub
- URL: https://github.com/devbruce/poetry-build-action
- Owner: devbruce
- License: mit
- Created: 2024-09-20T10:49:52.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-22T03:40:13.000Z (over 1 year ago)
- Last Synced: 2025-04-02T01:52:03.931Z (10 months ago)
- Topics: ci, github-action, poetry, python
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
poetry-build-action
This is a GitHub Action for setting up an environment based on [Poetry](https://python-poetry.org/) in the repository.
It simplifies the process of building and caching the environment directly.
## Inputs
```yml
inputs:
python-version:
description: "Python Version"
required: true
```
## Usages
```yml
name: "Usage: run pytest with poetry-build-action"
on: [push]
jobs:
test:
name: "Test"
runs-on: ubuntu-24.04
steps:
#----------------------------------------------
# Check out repo
#----------------------------------------------
- name: "Check out repository"
uses: actions/checkout@v4
#----------------------------------------------
# Build & Cache environment with poetry
#----------------------------------------------
- name: "Build & Cache with Poetry"
uses: devbruce/poetry-build-action@1.0.0
with:
python-version: "3.12"
#----------------------------------------------
# Run tests on poetry environment
#----------------------------------------------
- name: "Run tests"
run: |
poetry run pytest tests/
```
## References
- [Creating a composite action](https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-composite-action)
- [Install Poetry Action(snok/install-poetry)](https://github.com/marketplace/actions/install-poetry-action)
## Authors
- Maintainer: @devbruce