Skip to content

Commit

Permalink
ci: allow specifying python versions and limit ci to 3.10 only (#3388)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
ogabrielluiz authored Aug 16, 2024
1 parent 00d2cff commit 93e0ffb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ jobs:
name: Run Backend Tests
if: ${{ needs.path-filter.outputs.python == 'true' || needs.path-filter.outputs.tests == 'true' }}
uses: ./.github/workflows/python_test.yml
with:
python-versions: "['3.10']"

test-frontend:
needs: path-filter
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/python_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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 }}
Expand Down

0 comments on commit 93e0ffb

Please sign in to comment.