Skip to content

Commit 14f413c

Browse files
authored
Merge pull request #607 from per1234/avoid-redundant-task-calls
Only install Python package dependencies from relevant group
2 parents 317f814 + 91fdbe8 commit 14f413c

File tree

6 files changed

+16
-4
lines changed

6 files changed

+16
-4
lines changed

Taskfile.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ tasks:
143143
144144
# Check if ClangFormat is installed and the expected version
145145
clang-format:check-installed:
146+
run: when_changed
146147
vars:
147148
EXPECTED_CLANG_FORMAT_VERSION: "{{default .DEFAULT_CLANG_FORMAT_VERSION .CLANG_FORMAT_VERSION}}"
148149
cmds:
@@ -731,6 +732,7 @@ tasks:
731732
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/npm-task/Taskfile.yml
732733
npm:install-deps:
733734
desc: Install dependencies managed by npm
735+
run: when_changed
734736
dir: |
735737
"{{default "./" .PROJECT_PATH}}"
736738
cmds:
@@ -834,7 +836,7 @@ tasks:
834836
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
835837
poetry:install:
836838
desc: Install Poetry
837-
run: once
839+
run: when_changed
838840
cmds:
839841
- |
840842
if ! which yq &>/dev/null; then
@@ -883,11 +885,17 @@ tasks:
883885
884886
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
885887
poetry:install-deps:
886-
desc: Install dependencies managed by Poetry
888+
desc: |
889+
Install dependencies managed by Poetry.
890+
Environment variable parameters:
891+
- POETRY_GROUPS: Poetry dependency groups to install (default: install all dependencies).
892+
run: when_changed
887893
deps:
888894
- task: poetry:install
889895
cmds:
890-
- poetry install --no-root
896+
- |
897+
poetry install \
898+
{{if .POETRY_GROUPS}} --only {{.POETRY_GROUPS}} {{end}}
891899
892900
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
893901
poetry:update-deps:

workflow-templates/assets/check-markdown-task/Taskfile.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ version: "3"
44
tasks:
55
docs:generate:
66
desc: Create all generated documentation content
7+
run: when_changed
78
# This is an "umbrella" task used to call any documentation generation processes the project has.
89
# It can be left empty if there are none.
910

workflow-templates/assets/check-mkdocs-task/Taskfile.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ version: "3"
44
tasks:
55
docs:generate:
66
desc: Create all generated documentation content
7+
run: when_changed
78
# This is an "umbrella" task used to call any documentation generation processes the project has.
89
# It can be left empty if there are none.
910

workflow-templates/assets/deploy-cobra-mkdocs-versioned-poetry/Taskfile.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ tasks:
77
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/deploy-cobra-mkdocs-versioned-poetry/Taskfile.yml
88
docs:generate:
99
desc: Create all generated documentation content
10+
run: when_changed
1011
deps:
1112
- task: go:cli-docs
1213
cmds:

workflow-templates/assets/npm-task/Taskfile.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ tasks:
77
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/npm-task/Taskfile.yml
88
npm:install-deps:
99
desc: Install dependencies managed by npm
10+
run: when_changed
1011
dir: |
1112
"{{default "./" .PROJECT_PATH}}"
1213
cmds:

workflow-templates/assets/poetry-task/Taskfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ tasks:
55
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
66
poetry:install:
77
desc: Install Poetry
8-
run: once
8+
run: when_changed
99
cmds:
1010
- |
1111
if ! which yq &>/dev/null; then

0 commit comments

Comments
 (0)