File tree 5 files changed +1535
-15
lines changed
5 files changed +1535
-15
lines changed Original file line number Diff line number Diff line change 1
1
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-yaml-task.md
2
2
name : Check YAML
3
3
4
- env :
5
- # See: https://github.com/actions/setup-python/tree/main#available-versions-of-python
6
- PYTHON_VERSION : " 3.9"
7
-
8
4
# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
9
5
on :
10
6
create :
103
99
with :
104
100
python-version-file : pyproject.toml
105
101
106
- - name : Install Poetry
107
- run : pip install poetry
108
-
109
102
- name : Install Task
110
103
uses : arduino/setup-task@v2
111
104
with :
Original file line number Diff line number Diff line change 1
1
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/spell-check-task.md
2
2
name : Spell Check
3
3
4
- env :
5
- # See: https://github.com/actions/setup-python/tree/main#available-versions-of-python
6
- PYTHON_VERSION : " 3.9"
7
-
8
4
# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
9
5
on :
10
6
create :
57
53
with :
58
54
python-version-file : pyproject.toml
59
55
60
- - name : Install Poetry
61
- run : pip install poetry
62
-
63
56
- name : Install Task
64
57
uses : arduino/setup-task@v2
65
58
with :
Original file line number Diff line number Diff line change @@ -347,9 +347,42 @@ tasks:
347
347
-r "{{.STYLELINTRC_SCHEMA_PATH}}" \
348
348
-d "{{.INSTANCE_PATH}}"
349
349
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
+
350
381
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
351
382
poetry:install-deps :
352
383
desc : Install dependencies managed by Poetry
384
+ deps :
385
+ - task : poetry:install
353
386
cmds :
354
387
- poetry install --no-root
355
388
You can’t perform that action at this time.
0 commit comments