Allow override of Python version
This commit is contained in:
parent
c33cffb869
commit
22836419d3
@ -1,6 +1,11 @@
|
||||
name: Python + Docker CI
|
||||
name: Python w/ Poetry + Docker CI
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
python_version:
|
||||
type: string
|
||||
default: "3.11"
|
||||
description: "Version of Python to use for testing environment"
|
||||
secrets:
|
||||
SONAR_TOKEN:
|
||||
required: true
|
||||
@ -11,6 +16,11 @@ jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set python_version
|
||||
id: python_version
|
||||
run: |
|
||||
PYTHON_VERSION=${{ github.event.inputs.python_version }}
|
||||
echo "::set-output name=value::${PYTHON_VERSION:-"3.11"}"
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4.1.7
|
||||
with:
|
||||
@ -24,7 +34,7 @@ jobs:
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
python-version: "${{ steps.python_version.outputs.value }}"
|
||||
- name: Setup Poetry
|
||||
uses: abatilo/actions-poetry@v3
|
||||
- name: Install dependencies
|
||||
|
14
.github/workflows/ci-python-poetry.yml
vendored
14
.github/workflows/ci-python-poetry.yml
vendored
@ -1,6 +1,11 @@
|
||||
name: Python CI
|
||||
name: Python w/ Poetry CI
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
python_version:
|
||||
type: string
|
||||
default: "3.11"
|
||||
description: "Version of Python to use for testing environment"
|
||||
secrets:
|
||||
SONAR_TOKEN:
|
||||
required: true
|
||||
@ -11,6 +16,11 @@ jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set python_version
|
||||
id: python_version
|
||||
run: |
|
||||
PYTHON_VERSION=${{ github.event.inputs.python_version }}
|
||||
echo "::set-output name=value::${PYTHON_VERSION:-"3.11"}"
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4.1.7
|
||||
with:
|
||||
@ -18,7 +28,7 @@ jobs:
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
python-version: "${{ steps.python_version.outputs.value }}"
|
||||
- name: Setup Poetry
|
||||
uses: abatilo/actions-poetry@v3
|
||||
- name: Install dependencies
|
||||
|
12
.github/workflows/ci-python-with-docker.yml
vendored
12
.github/workflows/ci-python-with-docker.yml
vendored
@ -1,6 +1,11 @@
|
||||
name: Python + Docker CI
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
python_version:
|
||||
type: string
|
||||
default: "3.11"
|
||||
description: "Version of Python to use for testing environment"
|
||||
secrets:
|
||||
SONAR_TOKEN:
|
||||
required: true
|
||||
@ -11,6 +16,11 @@ jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set python_version
|
||||
id: python_version
|
||||
run: |
|
||||
PYTHON_VERSION=${{ github.event.inputs.python_version }}
|
||||
echo "::set-output name=value::${PYTHON_VERSION:-"3.11"}"
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4.1.7
|
||||
with:
|
||||
@ -24,7 +34,7 @@ jobs:
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
python-version: "${{ steps.python_version.outputs.value }}"
|
||||
- name: Update Pip
|
||||
run: |
|
||||
pip install -U pip
|
||||
|
12
.github/workflows/ci-python.yml
vendored
12
.github/workflows/ci-python.yml
vendored
@ -1,6 +1,11 @@
|
||||
name: Python CI
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
python_version:
|
||||
type: string
|
||||
default: "3.11"
|
||||
description: "Version of Python to use for testing environment"
|
||||
secrets:
|
||||
SONAR_TOKEN:
|
||||
required: true
|
||||
@ -11,6 +16,11 @@ jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set python_version
|
||||
id: python_version
|
||||
run: |
|
||||
PYTHON_VERSION=${{ github.event.inputs.python_version }}
|
||||
echo "::set-output name=value::${PYTHON_VERSION:-"3.11"}"
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4.1.7
|
||||
with:
|
||||
@ -18,7 +28,7 @@ jobs:
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
python-version: "${{ steps.python_version.outputs.value }}"
|
||||
- name: Update Pip
|
||||
run: |
|
||||
pip install -U pip
|
||||
|
Loading…
Reference in New Issue
Block a user