Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
truck

GitHub Action

Python Poetry Action

v2.1.6

Python Poetry Action

truck

Python Poetry Action

An action to run https://github.com/python-poetry/poetry

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Python Poetry Action

uses: abatilo/[email protected]

Learn more about this action in abatilo/actions-poetry

Choose a version

actions-poetry

GitHub Actions for Python projects using poetry

license release GitHub release date

Getting started

Breaking changes for v2

We've drastically simplified this GitHub Action for v2. This is no longer a Docker action that runs as its own container, it's just a simplified way for you to install poetry. This action now makes an assumption that you've already setup Python via setup-python or some other way. Since we're installing poetry directly to your environment, this also means that you can cache your dependencies more easily since everything is running on the host runner instead of an isolated container environment.

Create your workflow

name: CI
on: pull_request

jobs:
  ci:
    strategy:
      fail-fast: false
      matrix:
        python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
        poetry-version: ["1.0", "1.1.11"]
        os: [ubuntu-18.04, macos-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
      - name: Run image
        uses: abatilo/[email protected]
        with:
          poetry-version: ${{ matrix.poetry-version }}
      - name: View poetry --help
        run: poetry --help

License

MIT License - abatilo/actions-poetry

About the author