Skip to content

Commit 2cb88b3

Browse files
committed
Test with proper Python version
1 parent 68a2b49 commit 2cb88b3

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.github/actions/config-poetry/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Configure Poetry
33
description: GitHub Action to configure a poetry project
44

55
inputs:
6+
python-version:
7+
description: The version of python to use
8+
default: 3.12
69
poetry-version:
710
description: The version of poetry to install
811
default: 2.2.1
@@ -42,6 +45,8 @@ runs:
4245
uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
4346
with:
4447
version: 2025.7.12
48+
cache_key: "mise-{{platform}}-{{install_args_hash}}"
49+
install_args: "python@${{ inputs.python-version }}"
4550
- name: Vault
4651
# yamllint disable rule:line-length
4752
id: secrets
@@ -60,8 +65,7 @@ runs:
6065
POETRY_VIRTUALENVS_PATH: ${{ github.workspace }}/${{ inputs.poetry-virtualenvs-path }}
6166
POETRY_CACHE_DIR: ${{ github.workspace }}/${{ inputs.poetry-cache-dir }}
6267
run: |
63-
mise use -g poetry@${{ inputs.poetry-version }}
64-
mise use -g jfrog-cli@${{ inputs.jfrog-version }}
68+
poetry env use ${{ inputs.python-version }}
6569
echo "POETRY_VIRTUALENVS_PATH=${POETRY_VIRTUALENVS_PATH}" >> "$GITHUB_ENV"
6670
echo "POETRY_CACHE_DIR=${POETRY_CACHE_DIR}" >> "$GITHUB_ENV"
6771
${GITHUB_ACTION_PATH}/../../scripts/config-poetry.sh

.github/workflows/build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
steps:
4242
- name: Checkout repository
4343
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
44-
- name: Configure poetry for Windows
44+
- name: Configure poetry
4545
uses: ./.github/actions/config-poetry # We use this job to cache the poetry depend
4646
- run: |
4747
poetry install
@@ -56,7 +56,7 @@ jobs:
5656
steps:
5757
- name: Checkout repository
5858
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
59-
- name: Configure poetry for Windows
59+
- name: Configure poetry
6060
uses: ./.github/actions/config-poetry
6161
- run: |
6262
poetry run black src/ tests/ --check
@@ -142,6 +142,8 @@ jobs:
142142
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
143143
- name: Configure poetry
144144
uses: ./.github/actions/config-poetry
145+
with:
146+
python-version: ${{ matrix.python-version }}
145147
- name: Execute the test suite
146148
run: |
147149
poetry run pytest tests/

0 commit comments

Comments
 (0)