Skip to content

Bump mheap/github-action-required-labels from 5.4.2 to 5.5.0 (#9980) #3

Bump mheap/github-action-required-labels from 5.4.2 to 5.5.0 (#9980)

Bump mheap/github-action-required-labels from 5.4.2 to 5.5.0 (#9980) #3

name: Python Minimum Dependency Versions
on:
push:
branches:
- "develop"
pull_request:
types: [opened, synchronize, reopened]
# Allows workflow to be called from other workflows
workflow_call:
inputs:
ref:
required: true
type: string
# Avoid duplicate workflows on same branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-python-min
cancel-in-progress: true
defaults:
run:
shell: bash
env:
FORCE_COLOR: "1"
jobs:
py-min-deps-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
env:
PYTHON_VERSION: "${{needs.build_info.outputs.PYTHON_MIN_VERSION}}"
steps:
- name: Checkout Streamlit code
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
persist-credentials: false
submodules: "recursive"
fetch-depth: 2
- name: Set Python version vars
uses: ./.github/actions/build_info
- name: Set up Python ${{ env.PYTHON_MIN_VERSION }}
uses: actions/setup-python@v5
with:
python-version: "${{ env.PYTHON_MIN_VERSION }}"
- name: Setup virtual env
uses: ./.github/actions/make_init
with:
use_cached_venv: false
- name: Install min dependencies (force reinstall)
run: uv pip install -r lib/min-constraints-gen.txt --force-reinstall
- name: Generate Protobufs
run: make protobuf
- name: Make local modules visible
run: uv pip install --editable ./lib --no-deps
- name: Run Python Tests
run: make pytest
- name: CLI Smoke Tests
run: make cli-smoke-tests
- name: Validate min-constraints-gen
run: |
make gen-min-dep-constraints
git_status=$(git status --porcelain -- lib/min-constraints-gen.txt)
if [[ -n $git_status ]]; then
echo "::error::The min constraints file is out of date! Please run \`make gen-min-dep-constraints\` and commit the result."
echo "::group::git diff lib/min-constraints-gen.txt"
git diff lib/min-constraints-gen.txt
echo "::endgroup::"
exit 1
else
echo "min constraints file is up to date."
fi