File tree Expand file tree Collapse file tree 5 files changed +1535
-15
lines changed Expand file tree Collapse file tree 5 files changed +1535
-15
lines changed Original file line number Diff line number Diff line change 11# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-yaml-task.md
22name : Check YAML
33
4- env :
5- # See: https://github.com/actions/setup-python/tree/main#available-versions-of-python
6- PYTHON_VERSION : " 3.9"
7-
84# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
95on :
106 create :
10399 with :
104100 python-version-file : pyproject.toml
105101
106- - name : Install Poetry
107- run : pip install poetry
108-
109102 - name : Install Task
110103 uses : arduino/setup-task@v2
111104 with :
Original file line number Diff line number Diff line change 11# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/spell-check-task.md
22name : Spell Check
33
4- env :
5- # See: https://github.com/actions/setup-python/tree/main#available-versions-of-python
6- PYTHON_VERSION : " 3.9"
7-
84# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
95on :
106 create :
5753 with :
5854 python-version-file : pyproject.toml
5955
60- - name : Install Poetry
61- run : pip install poetry
62-
6356 - name : Install Task
6457 uses : arduino/setup-task@v2
6558 with :
Original file line number Diff line number Diff line change @@ -347,9 +347,42 @@ tasks:
347347 -r "{{.STYLELINTRC_SCHEMA_PATH}}" \
348348 -d "{{.INSTANCE_PATH}}"
349349
350+ poetry:install :
351+ desc : Install Poetry
352+ run : once
353+ cmds :
354+ - |
355+ if ! which pipx &>/dev/null; then
356+ echo "pipx not found or not in PATH."
357+ echo "Please install: https://pipx.pypa.io/stable/installation/#installing-pipx"
358+ exit 1
359+ fi
360+ - |
361+ if ! which yq &>/dev/null; then
362+ echo "yq not found or not in PATH."
363+ echo "Please install: https://github.com/mikefarah/yq/#install"
364+ exit 1
365+ fi
366+ - |
367+ export PIPX_DEFAULT_PYTHON="$( \
368+ task utility:normalize-path \
369+ RAW_PATH="$(which python)" \
370+ )"
371+ pipx install \
372+ --force \
373+ "poetry==$( \
374+ yq \
375+ --input-format toml \
376+ --output-format yaml \
377+ '.tool.poetry.group.pipx.dependencies.poetry' \
378+ < pyproject.toml
379+ )"
380+
350381 # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
351382 poetry:install-deps :
352383 desc : Install dependencies managed by Poetry
384+ deps :
385+ - task : poetry:install
353386 cmds :
354387 - poetry install --no-root
355388
You can’t perform that action at this time.
0 commit comments