Skip to content

past searches fix

past searches fix #161

name: License Compliance
on:
push:
branches: [main, ship_v1.0, v1, feature]
pull_request:
branches: [main, ship_v1.0, v1, feature]
schedule:
- cron: '0 0 * * 0' # weekly
jobs:
licenses:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies (pinned build set)
run: |
python -m pip install --upgrade pip
pip install -r requirements-build.txt
- name: Validate license metadata (direct build deps)
run: |
python scripts/validate_licenses.py --requirements requirements-build.txt --allow-unknown
- name: Generate THIRD_PARTY_LICENSES.txt
run: |
python scripts/generate_licenses.py --output THIRD_PARTY_LICENSES.txt
if [ ! -f THIRD_PARTY_LICENSES.txt ]; then
echo "ERROR: License bundle generation failed - THIRD_PARTY_LICENSES.txt not created"
exit 1
fi
# Verify file has content (at least key dependencies)
if ! grep -q "Package:" THIRD_PARTY_LICENSES.txt; then
echo "ERROR: License bundle appears empty or invalid"
exit 1
fi
- name: Upload license file artifact
uses: actions/upload-artifact@v4
with:
name: third-party-licenses
path: THIRD_PARTY_LICENSES.txt
retention-days: 30