name: Workflow Integration Tests on: push: branches: [ main, master, dev, develop, test/** ] pull_request: branches: [ main, master, dev, develop ] workflow_dispatch: inputs: test_suite: description: 'Test suite to run' required: false default: 'fast' type: choice options: - fast - full - platform jobs: ############################################################################# # Platform Detection Unit Tests ############################################################################# platform-detection-tests: name: Platform Detection Unit Tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.11' - name: Install dependencies working-directory: ./cli run: | python -m pip install --upgrade pip pip install pytest pytest-cov pyyaml # Install local monorepo dependencies first pip install -e ../sdk pip install -e ../ai # Then install CLI pip install -e . - name: Run platform detection tests working-directory: ./cli run: | pytest tests/test_platform_detection.py -v \ --cov=src/fuzzforge_cli \ --cov-report=term \ --cov-report=xml - name: Upload coverage uses: codecov/codecov-action@v4 with: file: ./cli/coverage.xml flags: cli-platform-detection name: cli-platform-detection ############################################################################# # Fast Workflow Tests (AMD64 only) ############################################################################# fast-workflow-tests: name: Fast Workflow Tests (AMD64) runs-on: ubuntu-latest needs: platform-detection-tests steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.11' - name: Install FuzzForge CLI working-directory: ./cli run: | python -m pip install --upgrade pip pip install pyyaml # Required by test script # Install local monorepo dependencies first pip install -e ../sdk pip install -e ../ai # Then install CLI pip install -e . - name: Copy environment template run: | mkdir -p volumes/env cp volumes/env/.env.template volumes/env/.env - name: Start FuzzForge services run: | docker compose up -d echo "⏳ Waiting for services to be ready..." sleep 30 # Wait for backend to be healthy max_wait=60 waited=0 while [ $waited -lt $max_wait ]; do if docker ps --filter "name=fuzzforge-backend" --format "{{.Status}}" | grep -q "healthy"; then echo "✅ Backend is healthy" break fi echo "Waiting for backend... ($waited/$max_wait seconds)" sleep 5 waited=$((waited + 5)) done - name: Initialize test projects run: | echo "Initializing test projects..." # Create minimal .fuzzforge directories for test projects for project in vulnerable_app android_test secret_detection_benchmark rust_test; do mkdir -p test_projects/$project/.fuzzforge cat > test_projects/$project/.fuzzforge/config.yaml < test_projects/android_test/.fuzzforge/config.yaml < test_projects/$project/.fuzzforge/config.yaml <