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

v1.0.0

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

Branch Base image Poetry version
master python:3.7.4-stretch 0.12.17
3.7.4 python:3.7.4-stretch 0.12.17
3.7.3 python:3.7.3-stretch 0.12.17

Create your workflow

Example taken from abatilo/typed-json-dataclass

on:
  pull_request:
    branches:
    - master

name: Publish typed_json_dataclass
jobs:
  flake8:
    name: flake8
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Install
      uses: abatilo/actions-poetry@master
      with:
        args: install
    - name: Run flake8
      uses: abatilo/actions-poetry@master
      with:
        args: run python -m flake8 --show-source --import-order-style pep8 typed_json_dataclass
          tests
  pytest:
    name: pytest
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Install
      uses: abatilo/actions-poetry@master
      with:
        args: install
    - name: Run pytest
      uses: abatilo/actions-poetry@master
      with:
        args: run python -m pytest --cov-report xml:codecov.xml --cov=typed_json_dataclass
          --cov-report=html --junit-xml=coverage.xml --cov-branch --cov-fail-under=100
          tests/

License

MIT License - abatilo/actions-poetry

About the author