Fuzz testing for chat completions (#84) #442
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Cross-Transformation Coverage | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'crates/**' | |
| - 'payloads/**' | |
| - 'Cargo.toml' | |
| pull_request: | |
| paths: | |
| - 'crates/**' | |
| - 'payloads/**' | |
| - 'Cargo.toml' | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo registry | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-coverage-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-coverage- | |
| - name: Install protobuf compiler | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler | |
| - name: Verify no unexpected failures | |
| run: | | |
| cargo test -p coverage-report --test cross_provider_test -- --nocapture | |
| - name: Generate coverage report | |
| run: | | |
| cargo run -p coverage-report > coverage_report.md | |
| - name: Post coverage to job summary | |
| run: | | |
| echo "# 🔄 Cross-Provider Transformation Coverage" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| cat coverage_report.md >> $GITHUB_STEP_SUMMARY | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: transformation-coverage-report | |
| path: coverage_report.md | |
| retention-days: 30 |