Skip to content

chore(site): fix site logo #99

chore(site): fix site logo

chore(site): fix site logo #99

Workflow file for this run

name: Release Gates
on:
push:
branches:
- main
- feature
workflow_dispatch:
jobs:
test-gates:
name: Test Gates
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.11', '3.12']
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Qt dependencies (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libegl1 libxcb-xinerama0 libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xfixes0
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Run unit tests
run: |
pytest src/tests/unit/ -v --cov=src/cuepoint --cov-report=xml
timeout-minutes: 30
env:
# Linux: offscreen platform for Qt without display/EGL. Windows: omit to avoid
# hangs (offscreen has limitations on Windows - see pytest-qt troubleshooting).
QT_QPA_PLATFORM: ${{ matrix.os == 'ubuntu-latest' && 'offscreen' || '' }}
CUEPOINT_SKIP_UPDATE_CHECK: "1"
continue-on-error: false
- name: Run integration tests
run: |
pytest src/tests/integration/ -v --timeout=120
env:
# Linux: offscreen for headless. Windows/macOS: omit (offscreen can hang on Windows).
QT_QPA_PLATFORM: ${{ matrix.os == 'ubuntu-latest' && 'offscreen' || '' }}
CUEPOINT_SKIP_UPDATE_CHECK: "1"
continue-on-error: false
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
fail_ci_if_error: false
minimum_coverage: 35
- name: Check test coverage
run: |
coverage report --fail-under=35
continue-on-error: false
code-quality-gates:
name: Code Quality Gates
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Qt dependencies (Linux)
run: |
sudo apt-get update
sudo apt-get install -y libegl1 libxcb-xinerama0 libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xfixes0
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Verify version sync (release gate R001)
run: python scripts/validate_version.py
- name: Validate changelog (release gate R002)
run: python scripts/validate_changelog.py
- name: Generate SBOM (release gate R003)
run: python scripts/generate_sbom.py --output build/sbom.spdx.json
- name: Validate deterministic build (pip --require-hashes, Design 2.8)
run: |
python -m pip install "pip<26"
python -m pip install pip-tools
python scripts/generate_requirements_hashes.py
pip install -r requirements-build-hashed.txt --require-hashes
echo "Deterministic install verified: pip --require-hashes succeeded"
- name: License bundle (release gate R004, Step 11)
run: |
pip install -r requirements-build.txt -q
python scripts/generate_licenses.py --output THIRD_PARTY_LICENSES.txt
if [ ! -f THIRD_PARTY_LICENSES.txt ]; then
echo "ERROR: License bundle generation failed"
exit 1
fi
if ! grep -q "Package:" THIRD_PARTY_LICENSES.txt; then
echo "ERROR: License bundle appears empty"
exit 1
fi
- name: Validate appcast (if present)
shell: bash
run: |
if [ -f "updates/macos/stable/appcast.xml" ] || [ -f "updates/windows/stable/appcast.xml" ]; then
python scripts/validate_appcast.py --macos updates/macos/stable/appcast.xml --windows updates/windows/stable/appcast.xml 2>/dev/null || true
fi
continue-on-error: true
- name: Validate update appcasts (if present)
shell: bash
run: |
MACOS_APPCAST="updates/macos/stable/appcast.xml"
WINDOWS_APPCAST="updates/windows/stable/appcast.xml"
args=()
if [ -f "$MACOS_APPCAST" ]; then
args+=(--macos "$MACOS_APPCAST")
fi
if [ -f "$WINDOWS_APPCAST" ]; then
args+=(--windows "$WINDOWS_APPCAST")
fi
if [ ${#args[@]} -eq 0 ]; then
echo "No update appcasts found in repo; skipping validate_updates.py"
exit 0
fi
python scripts/validate_updates.py "${args[@]}"
- name: Run linter
run: |
ruff check src/
continue-on-error: false
- name: Run type checker
run: |
python -m pytest src/tests/integration/test_step55_mypy_validation.py -v -p no:pytest-qt
continue-on-error: false
- name: Check code formatting
run: |
ruff format --check src/
continue-on-error: false
- name: Check file sizes
run: |
python scripts/check_file_sizes.py
continue-on-error: false
build-gates:
name: Build Gates
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Build application
run: |
python build.py || echo "Build script not found - skipping"
continue-on-error: true
- name: Verify build artifacts
run: |
python scripts/verify_artifacts.py || echo "No artifacts to verify"
continue-on-error: true
- name: Upload artifacts
if: success()
uses: actions/upload-artifact@v4
with:
name: build-artifacts-${{ matrix.os }}
path: dist/
retention-days: 7
if-no-files-found: ignore