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:
parent
00d2cffe46
commit
93e0ffb05e
2 changed files with 10 additions and 8 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -63,6 +63,8 @@ jobs:
|
||||||
name: Run Backend Tests
|
name: Run Backend Tests
|
||||||
if: ${{ needs.path-filter.outputs.python == 'true' || needs.path-filter.outputs.tests == 'true' }}
|
if: ${{ needs.path-filter.outputs.python == 'true' || needs.path-filter.outputs.tests == 'true' }}
|
||||||
uses: ./.github/workflows/python_test.yml
|
uses: ./.github/workflows/python_test.yml
|
||||||
|
with:
|
||||||
|
python-versions: "['3.10']"
|
||||||
|
|
||||||
test-frontend:
|
test-frontend:
|
||||||
needs: path-filter
|
needs: path-filter
|
||||||
|
|
|
||||||
16
.github/workflows/python_test.yml
vendored
16
.github/workflows/python_test.yml
vendored
|
|
@ -2,6 +2,12 @@ name: Python tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
python-versions:
|
||||||
|
description: "(Optional) Python versions to test"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
default: "['3.10', '3.11', '3.12']"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
branch:
|
branch:
|
||||||
|
|
@ -18,10 +24,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version:
|
python-version: ${{ fromJson(inputs.python-versions) }}
|
||||||
- "3.12"
|
|
||||||
- "3.11"
|
|
||||||
- "3.10"
|
|
||||||
splitCount: [5]
|
splitCount: [5]
|
||||||
group: [1, 2, 3, 4, 5]
|
group: [1, 2, 3, 4, 5]
|
||||||
env:
|
env:
|
||||||
|
|
@ -57,10 +60,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version:
|
python-version: ${{ fromJson(inputs.python-versions) }}
|
||||||
- "3.12"
|
|
||||||
- "3.11"
|
|
||||||
- "3.10"
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
|
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue