Skip to content

Commit 2b817ca

Browse files
authored
Merge pull request #490 from per1234/python-versioning-source
Use `pyproject.toml` as Python version source
2 parents 90ca1ab + 5e8e510 commit 2b817ca

File tree

4 files changed

+5
-16
lines changed

4 files changed

+5
-16
lines changed

.github/workflows/check-python-task.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-python-task.md
22
name: Check Python
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/using-workflows/events-that-trigger-workflows
95
on:
106
create:
@@ -70,7 +66,7 @@ jobs:
7066
- name: Install Python
7167
uses: actions/setup-python@v5
7268
with:
73-
python-version: ${{ env.PYTHON_VERSION }}
69+
python-version-file: pyproject.toml
7470

7571
- name: Install Poetry
7672
run: pip install poetry
@@ -99,7 +95,7 @@ jobs:
9995
- name: Install Python
10096
uses: actions/setup-python@v5
10197
with:
102-
python-version: ${{ env.PYTHON_VERSION }}
98+
python-version-file: pyproject.toml
10399

104100
- name: Install Poetry
105101
run: pip install poetry

.github/workflows/check-yaml-task.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-yaml-task.md
22
name: 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/using-workflows/events-that-trigger-workflows
95
on:
106
create:
@@ -98,7 +94,7 @@ jobs:
9894
- name: Install Python
9995
uses: actions/setup-python@v5
10096
with:
101-
python-version: ${{ env.PYTHON_VERSION }}
97+
python-version-file: pyproject.toml
10298

10399
- name: Install Poetry
104100
run: pip install poetry

.github/workflows/spell-check-task.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/spell-check-task.md
22
name: 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/using-workflows/events-that-trigger-workflows
95
on:
106
create:
@@ -52,7 +48,7 @@ jobs:
5248
- name: Install Python
5349
uses: actions/setup-python@v5
5450
with:
55-
python-version: ${{ env.PYTHON_VERSION }}
51+
python-version-file: pyproject.toml
5652

5753
- name: Install Poetry
5854
run: pip install poetry

docs/development.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ The following development tools must be available in your local environment:
189189
- [**Task**](https://taskfile.dev/installation/)
190190
- [**Node.js**](https://nodejs.dev/en/download/)
191191
- [**Python**](https://www.python.org/downloads/)
192+
- The **Python** version in use is defined in the `tool.poetry.dependencies` field of [`pyproject.toml`](../pyproject.toml).
192193
- [**Poetry**](https://python-poetry.org/docs/#installation)
193194

194195
### Running Checks

0 commit comments

Comments
 (0)