Files
superset2/.github/workflows/bump-python-package.yml
Evan Rusackas 10d2f0c585 ci: use astral-sh/setup-uv to speed up backend CI
setup-backend (used in 17 job steps across 13 workflows) bootstrapped uv
via `pip install --upgrade pip setuptools wheel uv` on every run, and only
cached pip's download dir via actions/setup-python's `cache: pip` -- pip
wasn't doing the actual installs (uv was), so that cache bought nothing.

astral-sh/setup-uv ships a prebuilt uv binary instead of installing it via
pip, and its own GitHub Actions cache (enable-cache: true) persists uv's
resolution/wheel cache across runs, keyed on requirements/*.txt and
pyproject.toml by default. Also drops the now-redundant pip/setuptools/wheel
upgrade -- uv's build isolation installs anything a package's build backend
declares (pyproject.toml's [build-system] already requires setuptools/wheel)
without needing them preinstalled in the target environment.

Also swaps the same `pip install uv` bootstrap in bump-python-package.yml.

The uv step is skipped when install-superset: false (helm-lint-test), since
otherwise there's nothing for it to install or cache and it fails the job.
2026-07-27 21:34:27 -07:00

84 lines
2.5 KiB
YAML

name: Bump Python Package
on:
# Can be triggered manually
workflow_dispatch:
inputs:
package:
required: false
description: The python package to bump (all if empty)
group:
required: false
description: The optional dependency group to bump (as defined in pyproject.toml)
limit:
required: true
description: Max number of PRs to open (0 for no limit)
default: 5
extra-flags:
required: false
default: --only-base
description: Additional flags to pass to the bump-python command
#schedule:
# - cron: '0 0 * * *' # Runs daily at midnight UTC
jobs:
bump-python-package:
runs-on: ubuntu-26.04
permissions:
actions: write
contents: write
pull-requests: write
checks: write
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: true
ref: master
- name: Setup supersetbot
uses: ./.github/actions/setup-supersetbot/
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.11"
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
python-version: "3.11"
enable-cache: true
- name: supersetbot bump-python -p "${{ github.event.inputs.package }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
INPUT_PACKAGE: ${{ github.event.inputs.package }}
INPUT_GROUP: ${{ github.event.inputs.group }}
INPUT_EXTRA_FLAGS: ${{ github.event.inputs.extra-flags }}
INPUT_LIMIT: ${{ github.event.inputs.limit }}
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
PACKAGE_OPT=""
if [ -n "${INPUT_PACKAGE}" ]; then
PACKAGE_OPT="-p ${INPUT_PACKAGE}"
fi
GROUP_OPT=""
if [ -n "${INPUT_GROUP}" ]; then
GROUP_OPT="-g ${INPUT_GROUP}"
fi
EXTRA_FLAGS="${INPUT_EXTRA_FLAGS}"
supersetbot bump-python \
--verbose \
--use-current-repo \
--include-subpackages \
--limit ${INPUT_LIMIT} \
$PACKAGE_OPT \
$GROUP_OPT \
$EXTRA_FLAGS