Skip to content

Sets up everything you need to perform `poetry install` and chill

License

Notifications You must be signed in to change notification settings

actions-rindeal/setup-poetry

Repository files navigation

Setup Poetry Action

This GitHub Action sets up Python and Poetry for your workflow, so you can just poetry install and chill.

Inputs

  • 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).

Outputs

  • cache-hit: True if all cache steps had a cache hit, otherwise false.

Usage

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

About

Sets up everything you need to perform `poetry install` and chill

Topics

Resources

License

Stars

Watchers

Forks