Skip to content

ci: Trust Dependabot for CI checks and improve bot handling #796

ci: Trust Dependabot for CI checks and improve bot handling

ci: Trust Dependabot for CI checks and improve bot handling #796

Workflow file for this run

---
name: Build and Test Python Packages
on:
push:
branches:
- 'main'
- 'release-*'
tags:
- 'v*'
pull_request:
branches:
- 'main'
- 'release-*'
jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ["3.11", "3.13"]
name: Build packages (Python ${{ matrix.python-version }})
steps:
- name: Checkout Repository
uses: actions/checkout@v6
with:
fetch-depth: 0 # Needed for proper versioning
- name: Setup Python CI
uses: ./.github/actions/setup-python-ci
with:
python-version: ${{ matrix.python-version }}
- name: Build Package
run: |
echo "Building package (kfp-components)..."
uv build --out-dir dist/
echo "Package built successfully"
ls -lah dist/
- name: Validate Wheel Contents
run: |
echo "Validating package wheel contents..."
for wheel in dist/*.whl; do
python .github/scripts/validate_wheel/validate_wheel.py "$wheel"
done
- name: Create test environment
run: |
uv venv test-env
echo "Virtual environment created"
- name: Test Package Installation and Imports
run: |
echo "Installing package..."
uv pip install --python test-env dist/*.whl
echo "Testing package imports..."
test-env/bin/python .github/scripts/package_imports/package_imports.py
- name: Validate Package Metadata
run: |
echo "Extracting and validating package metadata..."
for wheel in dist/*.whl; do
echo "Validating package metadata: $wheel"
python .github/scripts/validate_wheel/validate_wheel.py "$wheel"
done
- name: Upload Package Artifacts
uses: actions/upload-artifact@v7
with:
name: package-py${{ matrix.python-version }}
path: dist/
retention-days: 30