Skip to content

Commit d8bba9f

Browse files
committed
Allow dependency groups to be specified for install
1 parent f42e2f2 commit d8bba9f

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

analyze-project/action.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ inputs:
1515
default: ''
1616
required: false
1717
type: string
18+
dependency-groups:
19+
# E.g. "examples,docs"
20+
description: 'List of Poetry dependency groups to install (separated by commas)'
21+
default: ''
22+
required: false
23+
type: string
1824

1925
runs:
2026
using: composite
@@ -45,11 +51,14 @@ runs:
4551
key: ${{ steps.get_project_info.outputs.name }}-${{ runner.os }}-py${{ env.pythonVersion }}-${{ hashFiles(format('{0}/poetry.lock', inputs.project-directory)) }}
4652
- name: Install ${{ steps.get_project_info.outputs.name }}
4753
run: |
54+
install_cmd="poetry install -v"
4855
if [ -n "${{ inputs.extras }}" ]; then
49-
poetry install -v --extras '${{ inputs.extras }}'
50-
else
51-
poetry install -v
56+
install_cmd="$install_cmd --extras '${{ inputs.extras }}'"
57+
fi
58+
if [ -n "${{ inputs.dependency-groups }}" ]; then
59+
install_cmd="$install_cmd --with ${{ inputs.dependency-groups }}"
5260
fi
61+
eval $install_cmd
5362
working-directory: ${{ inputs.project-directory }}
5463
shell: bash
5564
- name: Lint

0 commit comments

Comments
 (0)