Skip to content

Commit ef8707a

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

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

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

Lines changed: 8 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.12
69
poetry-version:
710
description: The version of poetry to install
811
default: 2.2.1
@@ -42,6 +45,11 @@ runs:
4245
uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
4346
with:
4447
version: 2025.7.12
48+
- name: Install Python $${{ inputs.python-version }}
49+
shell: bash
50+
run: |
51+
mise install python@${{ inputs.python-version }}
52+
mise use -g python@${{ inputs.python-version }}
4553
- name: Vault
4654
# yamllint disable rule:line-length
4755
id: secrets
@@ -60,8 +68,6 @@ runs:
6068
POETRY_VIRTUALENVS_PATH: ${{ github.workspace }}/${{ inputs.poetry-virtualenvs-path }}
6169
POETRY_CACHE_DIR: ${{ github.workspace }}/${{ inputs.poetry-cache-dir }}
6270
run: |
63-
mise use -g poetry@${{ inputs.poetry-version }}
64-
mise use -g jfrog-cli@${{ inputs.jfrog-version }}
6571
echo "POETRY_VIRTUALENVS_PATH=${POETRY_VIRTUALENVS_PATH}" >> "$GITHUB_ENV"
6672
echo "POETRY_CACHE_DIR=${POETRY_CACHE_DIR}" >> "$GITHUB_ENV"
6773
${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)