ci: Add Python version input to setup-uv action and update workflow configuration (#5288)
* feat: add input for Python version in setup-uv action * Introduced a new input parameter 'python-version' to allow users to specify the Python version for the setup-uv action, defaulting to 3.12. * Updated the action to use the new input instead of relying on a version file. * fix: update Python version setup in GitHub Actions workflow * Changed the Python version setup in the GitHub Actions workflow to use a matrix input instead of a version file, enhancing flexibility and allowing for dynamic version specification. * This change applies to both the main job and the test job in the workflow configuration. * chore: update Python version in GitHub Actions workflow to 3.12 * Changed the Python version setup in the GitHub Actions workflow from using a version file to directly specifying Python 3.12, ensuring consistency and clarity in the environment configuration. * chore: add environment variables for OpenAI and Astra DB in GitHub Actions workflow * Introduced new environment variables for OPENAI_API_KEY, ASTRA_DB_API_ENDPOINT, and ASTRA_DB_APPLICATION_TOKEN in the store_pytest_durations.yml workflow file to enhance integration capabilities and secure access to necessary APIs.
This commit is contained in:
parent
ac356ec32f
commit
cebf4b103b
3 changed files with 12 additions and 4 deletions
7
.github/actions/setup-uv/action.yml
vendored
7
.github/actions/setup-uv/action.yml
vendored
|
|
@ -1,6 +1,11 @@
|
|||
name: "Setup uv"
|
||||
description: "Checks out code, installs uv, and sets up Python environment"
|
||||
|
||||
inputs:
|
||||
python-version:
|
||||
description: "Python version to use"
|
||||
default: "3.12"
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
|
|
@ -13,7 +18,7 @@ runs:
|
|||
- name: "Set up Python"
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version-file: "pyproject.toml"
|
||||
python-version: ${{ inputs.python-version }}
|
||||
|
||||
- name: Restore uv cache
|
||||
uses: actions/cache@v4
|
||||
|
|
|
|||
4
.github/workflows/python_test.yml
vendored
4
.github/workflows/python_test.yml
vendored
|
|
@ -57,7 +57,7 @@ jobs:
|
|||
- name: "Set up Python"
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version-file: "pyproject.toml"
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Restore uv cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
|
|
@ -94,7 +94,7 @@ jobs:
|
|||
- name: "Set up Python"
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version-file: "pyproject.toml"
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Restore uv cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
|
|
|
|||
5
.github/workflows/store_pytest_durations.yml
vendored
5
.github/workflows/store_pytest_durations.yml
vendored
|
|
@ -17,6 +17,9 @@ jobs:
|
|||
contents: write
|
||||
pull-requests: write
|
||||
env:
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
ASTRA_DB_API_ENDPOINT: ${{ secrets.ASTRA_DB_API_ENDPOINT }}
|
||||
ASTRA_DB_APPLICATION_TOKEN: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN }}
|
||||
UV_CACHE_DIR: /tmp/.uv-cache
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
|
@ -28,7 +31,7 @@ jobs:
|
|||
- name: "Set up Python"
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version-file: "pyproject.toml"
|
||||
python-version: "3.12"
|
||||
- name: Restore uv cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue