Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/quota-router-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@ jobs:
with:
python-version: '3.12'

# Install Rust explicitly. Without this, `maturin develop` below
# tries to bootstrap its own rustc via rustup and fails on fresh
# runners with:
# error: failed to install component: 'clippy-preview-x86_64-unknown-linux-gnu',
# detected conflict: 'bin/cargo-clippy'
# The `test` job above has the same step and works; this job was
# missing it. Pinning `dtolnay/rust-toolchain@stable` matches
# the `test` job exactly and gives maturin a clean rustup to use.
- name: Install Rust
uses: dtolnay/rust-toolchain@stable

# See note above on explicit venv creation.
- name: Create venv and install mypy
run: |
Expand Down Expand Up @@ -110,6 +121,18 @@ jobs:

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
# dtolnay/rust-toolchain defaults to `--profile minimal`, which
# installs only rustc (no cargo, no clippy, no rustfmt). The
# `test` and `type-check` jobs in this workflow happen to work
# because their runners have cargo pre-installed in the Ubuntu
# image. The `build` job hit a fresh runner without that, and
# maturin failed with:
# error: 'cargo' is not installed for the toolchain '1.96.0-x86_64-unknown-linux-gnu'
# Switching to `profile: default` installs cargo (and clippy,
# rustfmt, rust-docs) explicitly via rustup, making the build
# job self-sufficient regardless of the runner image.
profile: default

- name: Install maturin
run: pip install --upgrade pip && pip install maturin
Expand Down
2 changes: 0 additions & 2 deletions crates/octo-adapter-telegram/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,3 @@ tempfile = { version = "3.10", optional = true }
tokio = { version = "1.35", features = ["test-util"] }
serde_yaml = "0.9"
ed25519-dalek = "2"
# tracing setup in live_session_test (env-filter for RUST_LOG control)
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
2 changes: 2 additions & 0 deletions live-tests/octo-telegram-live-tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
target/
Cargo.lock
29 changes: 29 additions & 0 deletions live-tests/octo-telegram-live-tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[workspace]
# Empty workspace table — declares this directory a standalone package
# (NOT a member of the parent workspace at the repo root). This is what
# physically keeps `cargo test --workspace` from the root from ever
# building or running these tests.

[package]
name = "octo-telegram-live-tests"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Live integration tests for octo-adapter-telegram against a real TDLib session. Intentionally NOT a workspace member — see docs/ and the crate's README below. Run with: cd live-tests/octo-telegram-live-tests && cargo test -- --ignored --nocapture --test-threads=1"

# This crate is NOT in the main workspace on purpose:
# 1. CI's `cargo test --workspace` from the repo root must never build or
# run these tests. A live Telegram session, mounted data dir, and
# working TDLib shared library are all required.
# 2. The main workspace's `octo-adapter-telegram` is built with `real-tdlib`
# enabled transitively (via `octo-telegram-onboard-core`'s feature
# unification), so any test file inside its `tests/` would be auto-built
# by `cargo test --workspace` regardless of feature gates. Moving the
# live test here physically separates it from the CI build path.
# To run: cd live-tests/octo-telegram-live-tests && cargo test -- --ignored --nocapture --test-threads=1

[dependencies]
octo-adapter-telegram = { path = "../../crates/octo-adapter-telegram", features = ["real-tdlib"] }
octo-network = { path = "../../crates/octo-network" }
tokio = { version = "1.35", features = ["rt-multi-thread", "macros", "time", "sync"] }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
5 changes: 5 additions & 0 deletions live-tests/octo-telegram-live-tests/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//! Marker library for the live-tests crate. This crate only exists to host
//! integration tests under `tests/`; it has no library API of its own.
//!
//! See `tests/live_session_test.rs` for the actual tests, and `Cargo.toml`
//! for why this crate is intentionally outside the main workspace.
Loading