This GitHub Action sets up Python and Poetry for your workflow,
so you can just poetry install
and chill.
python-version
: Python version to set up (default: 3.x).poetry-version
: Poetry version to set up (default: latest).pipx-packages
: Additional pipx packages to install (optional).
cache-hit
: True if all cache steps had a cache hit, otherwise false.
name: My Workflow
on:
push:
branches:
- master
jobs:
setup-python-and-poetry:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@main
- name: Set up Python and Poetry
uses: actions-rindeal/setup-poetry@master
with:
# python-version: 3.11
# poetry-version: 1.8.1
# pipx-packages: "black flake8"
- name: Run tests
run: |
poetry install
poetry run pytest