Skip to content

Commit 819884b

Browse files
authored
Merge pull request #5 from compas-dev/extras
Add support for extra dependencies
2 parents 462c071 + c230dc5 commit 819884b

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

action.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ inputs:
4949
description: "Whether to run the pre-build task after installation and before running any tests. Value can be 'true', or 'false'"
5050
required: false
5151
default: "false"
52+
extras:
53+
description: "comma-separated list of optional dependencies to install (e.g. dev,docs,mkdocs)"
54+
required: false
55+
default: "dev"
5256

5357
runs:
5458
using: "composite"
@@ -66,10 +70,15 @@ runs:
6670

6771
- if: inputs.use_conda == 'false' && (runner.os != 'macOS' || inputs.python != '3.9')
6872
shell: bash
73+
env:
74+
EXTRAS: ${{ inputs.extras }}
6975
run: |
7076
echo "This is a PYPI package."
7177
python -m pip install --upgrade pip
72-
pip install -e ".[dev]"
78+
79+
if [[ -n "$EXTRAS" ]]; then
80+
pip install -e ".[$EXTRAS]"
81+
fi
7382
7483
if [[ ${{ inputs.run_prebuild }} = "true" ]]; then
7584
echo Running pre-build task

0 commit comments

Comments
 (0)