Skip to content

Commit

Permalink
feat: introduce poetry-black workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
b1rger committed Jun 15, 2023
1 parent ee62b75 commit 56d6571
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/poetry-black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#SPDX-FileCopyrightText: 2023 Birger Schacht
#SPDX-License-Identifier: MIT
name: Run black linter via poetry

on:
workflow_call:
inputs:
src:
required: true
type: string
options:
required: false
type: string

jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
cache: 'poetry'
- name: Install poetry
run: pip install poetry
- name: Install black
run: |
python -m poetry install --no-root --no-directory --only dev
- name: Run black
run: |
python -m poetry run black ${{inputs.options}} ${{inputs.src}}

0 comments on commit 56d6571

Please sign in to comment.