Skip to content

Commit

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

on:
workflow_call:
inputs:
python-version:
required: false
type: string
default: "3.11"
src:
required: true
type: string
options:
required: false
type: string

jobs:
deptry:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# for poetry caching, we have to install poetry before setting up python
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
cache: 'poetry'
cache-dependency-path: "pyproject.toml"
python-version: ${{ inputs.python-version }}
- name: Install dev dependencies
run: |
poetry install --no-root --no-directory --only dev
- name: Run deptry
run: |
poetry run deptry ${{inputs.src}} ${{inputs.options}}

0 comments on commit 5bf6c4f

Please sign in to comment.