Commit Graph

5 Commits

Author SHA1 Message Date
tduhamel42
2bd0657d01 fix: update android platform tests to use manual project init
Android Worker Platform Tests job was still using 'ff init' which
requires interaction. Updated to use manual .fuzzforge creation like
the fast-workflow-tests job.

This fixes the 'No FuzzForge project found' error in android workflow tests.
2025-10-29 16:27:43 +01:00
tduhamel42
2d045d37f2 fix(ci): Remove invalid --non-interactive flag from ff init
The ff init command doesn't have a --non-interactive flag. The command
already runs non-interactively by default, so the flag is not needed.

This was causing initialization to fail with 'No such option' error.
2025-10-29 15:18:15 +01:00
tduhamel42
5bf481aee6 fix(ci): Initialize test projects before running workflow tests
Test projects need to be initialized with 'ff init' to create
.fuzzforge directories before workflows can run. Added initialization
steps to all workflow test jobs:
- Fast workflow tests
- Android platform tests
- Full workflow tests

This ensures projects are properly set up in CI where .fuzzforge
directories don't exist (they're in .gitignore).
2025-10-29 15:00:51 +01:00
tduhamel42
52f168e2c2 fix(ci): Install local monorepo dependencies before CLI
The GitHub Actions workflow was failing because the CLI depends on
fuzzforge-sdk and fuzzforge-ai packages which are local to the monorepo
and not available on PyPI.

Updated all jobs to install local dependencies first:
- platform-detection-tests
- fast-workflow-tests
- android-platform-tests
- full-workflow-tests

This ensures pip can resolve all dependencies correctly.
2025-10-29 14:43:59 +01:00
tduhamel42
ddc6f163f7 feat(test): add automated workflow testing framework
- Add test matrix configuration (.github/test-matrix.yaml)
  - Maps 8 workflows to workers, test projects, and parameters
  - Excludes LLM and OSS-Fuzz workflows
  - Defines fast, full, and platform test suites

- Add workflow execution test script (scripts/test_workflows.py)
  - Executes workflows with parameter validation
  - Validates SARIF export and structure
  - Counts findings and measures execution time
  - Generates test summary reports

- Add platform detection unit tests (cli/tests/test_platform_detection.py)
  - Tests platform detection (x86_64, aarch64, arm64)
  - Tests Dockerfile selection for multi-platform workers
  - Tests metadata.yaml parsing
  - Includes integration tests

- Add GitHub Actions workflow (.github/workflows/test-workflows.yml)
  - Platform detection unit tests
  - Fast workflow tests (5 workflows on every PR)
  - Android platform-specific tests (AMD64 + ARM64)
  - Full workflow tests (on main/schedule)
  - Automatic log collection on failure

- Add comprehensive testing documentation (docs/docs/development/testing.md)
  - Local testing guide
  - CI/CD testing explanation
  - Platform-specific testing guide
  - Debugging guide and best practices

- Update test.yml with reference to new workflow tests

- Remove tracked .fuzzforge/findings.db (already in .gitignore)

Tested locally:
- Single workflow test: python_sast (6.87s) 
- Fast test suite: 5/5 workflows passed 
  - android_static_analysis (98.98s) 
  - python_sast (6.78s) 
  - secret_detection (38.04s) 
  - gitleaks_detection (1.67s) 
  - trufflehog_detection (1.64s) 
2025-10-29 14:34:31 +01:00