Merge pull request #23 from Pollux-Studio/develop #82
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: backend | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| validate-linux: | |
| name: Backend validation (shared checks) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Linux system deps | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| pkg-config \ | |
| libglib2.0-dev \ | |
| libgtk-3-dev \ | |
| libjavascriptcoregtk-4.1-dev \ | |
| libsoup-3.0-dev \ | |
| libwebkit2gtk-4.1-dev || sudo apt-get install -y libwebkit2gtk-4.0-dev | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: cargo fmt | |
| run: cargo fmt --check | |
| - name: cargo clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| - name: backend tests | |
| run: cargo test --workspace --all-features | |
| - name: backend cli smoke tests | |
| run: cargo test -p maxc-cli | |
| - name: backend perf guardrails | |
| run: cargo run -p maxc-automation --bin perf-harness -- --mode synthetic --profile ci --json | |
| - name: cargo llvm-cov | |
| run: cargo llvm-cov --workspace --all-features --fail-under-lines 85 | |
| validate-windows-runtime: | |
| name: Backend validation (Windows runtime) | |
| needs: validate-linux | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: cargo fmt | |
| run: cargo fmt --check | |
| - name: cargo clippy | |
| run: cargo clippy --workspace --all-targets --all-features -- -D warnings | |
| - name: backend tests | |
| run: cargo test --workspace --all-features | |
| - name: backend synthetic perf guardrails | |
| run: cargo run -p maxc-automation --bin perf-harness -- --mode synthetic --profile ci --json | |
| - name: probe backend real browser runtime | |
| id: browser_probe | |
| shell: pwsh | |
| run: | | |
| $probe = cargo run -p maxc-automation --bin perf-harness -- --probe-real-browser-runtime --json | Out-String | |
| $probe | Set-Content -Path browser-probe.json | |
| $available = (Get-Content browser-probe.json | ConvertFrom-Json).available | |
| "available=$available" | Out-File -FilePath $env:GITHUB_OUTPUT -Append | |
| - name: backend real runtime perf guardrails | |
| if: steps.browser_probe.outputs.available == 'True' | |
| run: cargo run -p maxc-automation --bin perf-harness -- --mode real-runtime --profile ci --json | |
| - name: skip backend real runtime perf guardrails | |
| if: steps.browser_probe.outputs.available != 'True' | |
| shell: pwsh | |
| run: | | |
| Write-Host "Skipping real-runtime browser perf guardrails because no launchable real browser runtime is available on this runner." |