Skip to content

Configure task dependencies to avoid redundant execution #607

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ tasks:

# Check if ClangFormat is installed and the expected version
clang-format:check-installed:
run: when_changed
vars:
EXPECTED_CLANG_FORMAT_VERSION: "{{default .DEFAULT_CLANG_FORMAT_VERSION .CLANG_FORMAT_VERSION}}"
cmds:
Expand Down Expand Up @@ -731,6 +732,7 @@ tasks:
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/npm-task/Taskfile.yml
npm:install-deps:
desc: Install dependencies managed by npm
run: when_changed
dir: |
"{{default "./" .PROJECT_PATH}}"
cmds:
Expand Down Expand Up @@ -834,7 +836,7 @@ tasks:
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
poetry:install:
desc: Install Poetry
run: once
run: when_changed
cmds:
- |
if ! which yq &>/dev/null; then
Expand Down Expand Up @@ -883,11 +885,17 @@ tasks:

# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
poetry:install-deps:
desc: Install dependencies managed by Poetry
desc: |
Install dependencies managed by Poetry.
Environment variable parameters:
- POETRY_GROUPS: Poetry dependency groups to install (default: install all dependencies).
run: when_changed
deps:
- task: poetry:install
cmds:
- poetry install --no-root
- |
poetry install \
{{if .POETRY_GROUPS}} --only {{.POETRY_GROUPS}} {{end}}

# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
poetry:update-deps:
Expand Down
1 change: 1 addition & 0 deletions workflow-templates/assets/check-markdown-task/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version: "3"
tasks:
docs:generate:
desc: Create all generated documentation content
run: when_changed
# This is an "umbrella" task used to call any documentation generation processes the project has.
# It can be left empty if there are none.

Expand Down
1 change: 1 addition & 0 deletions workflow-templates/assets/check-mkdocs-task/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version: "3"
tasks:
docs:generate:
desc: Create all generated documentation content
run: when_changed
# This is an "umbrella" task used to call any documentation generation processes the project has.
# It can be left empty if there are none.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tasks:
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/deploy-cobra-mkdocs-versioned-poetry/Taskfile.yml
docs:generate:
desc: Create all generated documentation content
run: when_changed
deps:
- task: go:cli-docs
cmds:
Expand Down
1 change: 1 addition & 0 deletions workflow-templates/assets/npm-task/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tasks:
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/npm-task/Taskfile.yml
npm:install-deps:
desc: Install dependencies managed by npm
run: when_changed
dir: |
"{{default "./" .PROJECT_PATH}}"
cmds:
Expand Down
2 changes: 1 addition & 1 deletion workflow-templates/assets/poetry-task/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ tasks:
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
poetry:install:
desc: Install Poetry
run: once
run: when_changed
cmds:
- |
if ! which yq &>/dev/null; then
Expand Down
Loading