-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(poetry-deptry): introduce poetry-deptry workflow
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |