oncall-engine/.github/actions/setup-python/action.yml
Joey Orlando 49d20f1a7e
bump uwsgi to 2.0.26 + Python to 3.12.3 (#4495)
# What this PR does

- bumps `uwsgi` to latest version (`2.0.26`), which unblocks us from
bumping Python to 3.12
- bumps Python to 3.12.3
- refactor the Snyk GitHub Actions workflow to use the composable
actions for installed frontend and backend dependencies
- fixes several `AttributeError`s in our tests that went from a warning
to an error in Python 3.12 (see
https://github.com/python/cpython/issues/100690)

# Which issue(s) this PR closes

Closes #4358
Closes https://github.com/grafana/oncall/issues/4387
2024-06-10 15:33:37 -04:00

27 lines
950 B
YAML

name: "Setup Python"
description: "Setup Python + optionally install dependencies from a set of requirements file(s)"
inputs:
install-dependencies:
description: "Whether to install dependencies from the Python requirements file(s)"
required: false
default: "true"
python-requirements-paths:
description: "The path(s) to the Python requirements file(s) to install"
required: false
default: "engine/requirements.txt engine/requirements-dev.txt"
runs:
using: "composite"
steps:
- name: Setup Python
id: setup-python
uses: actions/setup-python@v5.1.0
with:
python-version: "3.12.3"
cache: "pip"
cache-dependency-path: ${{ inputs.python-requirements-paths }}
- name: Install Python dependencies
if: ${{ inputs.install-dependencies == 'true' }}
shell: bash
run: |
pip install uv
uv pip sync --system ${{ inputs.python-requirements-paths }}