ci: allow specifying python versions and limit ci to 3.10 only (#3388)

* ci(python-test): Add ability to specify Python versions to test.

* ci: Specify Python version 3.10 for backend tests.

* build: Require python-versions input in workflow file.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-08-16 15:28:35 -03:00 committed by GitHub
commit 93e0ffb05e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 8 deletions

View file

@ -2,6 +2,12 @@ name: Python tests
on:
workflow_call:
inputs:
python-versions:
description: "(Optional) Python versions to test"
required: true
type: string
default: "['3.10', '3.11', '3.12']"
workflow_dispatch:
inputs:
branch:
@ -18,10 +24,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.12"
- "3.11"
- "3.10"
python-version: ${{ fromJson(inputs.python-versions) }}
splitCount: [5]
group: [1, 2, 3, 4, 5]
env:
@ -57,10 +60,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.12"
- "3.11"
- "3.10"
python-version: ${{ fromJson(inputs.python-versions) }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}