test: add E2E integration tests for Telegram markdown rendering #54
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: -Dwarnings | |
| jobs: | |
| check: | |
| name: Check & Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| test: | |
| name: Test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| env: | |
| LIVE_API_KEY: ${{ secrets.LIVE_API_KEY }} | |
| LIVE_BASE_URL: ${{ secrets.LIVE_BASE_URL }} | |
| LIVE_MODEL: ${{ secrets.LIVE_MODEL }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Run unit tests | |
| run: cargo test --lib | |
| - name: Run CLI integration tests | |
| run: cargo test --test cli_run | |
| - name: Run AgentLoop integration tests | |
| run: | | |
| cargo test --test agent_loop_routing_integration | |
| cargo test --test agent_loop_tooling_integration | |
| - name: Run Telegram integration tests | |
| run: | | |
| cargo test --test telegram_routing_integration | |
| cargo test --test telegram_provider_integration | |
| cargo test --test telegram_tools_integration | |
| cargo test --test telegram_markdown_integration | |
| - name: Run OpenAI-compatible provider integration tests | |
| run: cargo test --test openai_provider_integration | |
| - name: Run live E2E tests | |
| if: ${{ env.LIVE_API_KEY != '' }} | |
| env: | |
| API_KEY: ${{ env.LIVE_API_KEY }} | |
| BASE_URL: ${{ env.LIVE_BASE_URL }} | |
| MODEL: ${{ env.LIVE_MODEL }} | |
| run: cargo test --test live_integration -- --nocapture | |
| build: | |
| name: Build Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Build release | |
| run: cargo build --release |