ci: run the test suite on push and pull request - #300
Conversation
The repository has no test workflow — `.github/workflows` holds only the two documentation jobs — so nothing has been running the unit tests on a push or a pull request. Adding one first needs the test targets to compile. `tests/ib_paper_compat` was left behind by three struct changes: `ControlCommand::FetchContractDetails` gained `filters`, and `OrderRequest`'s trailing-stop and adjustable-stop variants gained `trail_stop_price` and the adjustable trailing pair. Thirteen literals, all mechanical. The workflow installs `tzdata-legacy` alongside `tzdata`. `config::expiry_tests` resolves zones by their legacy aliases, and on 24.04 — which `ubuntu-latest` resolves to — those aliases are not in `tzdata` at all: they were split into a separate package, so a full `tzdata` install still leaves `/usr/share/zoneinfo/US/` absent and both tests failing. Installing only `tzdata`, as this first did, would have made the workflow red on its own first run. Scoped to `--lib` deliberately. Building `--all-targets` keeps the integration tests honest about compiling, but they are not run: with the compile fixed, nine of them fail, and a workflow that is red from its first run gets ignored rather than fixed. The Python bindings are built but not tested. They sit behind a non-default feature, so nothing else here compiles them, and 23 of their tests need a live session. Keeping them compiling is most of the value and costs one step. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
d2e8f5f to
fde8fce
Compare
|
Reviewed, and the finding is one the commit argues against itself: this workflow was red on its own first run. Fixed in The message says a workflow red from the start gets ignored rather than fixed, and then installed Now installs both. Note that #336 fixes the same failures in the library, by resolving the legacy names when the system does not carry them — the two are complementary, and CI should be green whichever lands first. Also added: a build of the Python bindings. They sit behind a non-default feature, so nothing else in the workflow compiles them, and nothing was keeping them compiling. Their tests need a live session and stay out, but the build is one step and most of the value. Corrected in the message: it claimed Not taken: pinning the actions to SHAs. It is the safer practice, but the repository's other two workflows both float on tags, and quietly diverging in a PR about running tests is the wrong place to change that policy. Worth doing across all three deliberately if wanted. The rest checks out: failures do fail the job, no |
|
No further changes needed here. The compile restoration and the CI claims both check out. One caveat it raised, which I am leaving as designed: |
Summary
.github/workflowsholds only the two documentation jobs, so nothing runs the 802 unit tests on a push or a pull request.tests/ib_paper_compatandtests/scenarioswere left behind by three struct changes —ControlCommand::FetchContractDetailsgainedfilters, andOrderRequest's trailing-stop and adjustable-stop variants gainedtrail_stop_priceand the adjustable trailing pair. Thirteen literals, all mechanical.config::expiry_testsresolves zones by their legacy aliases (US/Eastern), which live in tzdata's backward-compatibility file and are absent from minimal installs — those two tests fail on such a box for that reason alone, which is why they look like permanent failures locally.Closes #301.
What this deliberately does not run, and why
--all-targets, so they must keep compiling, but it runs only--lib. With the compile fixed, nine of them fail: a stale coverage manifest (ControlCommand::Pinghas no mapping), three PnL scenarios, and several reconnect tests. A workflow that is red from its first run gets ignored rather than fixed, so those are worth a separate look before they gate anything.src/pythonsits behind a non-default feature, so a plaincargo testnever compiles it — every Python path is currently unexercised by any automated run. Its suite has 276 passing and 23 failing, the failures allRuntimeError: Not connected, so it needs a session or those tests need skipping before it can gate merges.Both are in ibx#300.
Test plan
cargo build --lib --all-targets— clean; every test target compiles for the first time.cargo test --lib— 802 pass. The twoconfig::expiry_testsfailures are the tzdata aliases above and pass on a runner with the full database, which is why the workflow installs it.cargo test --no-fail-fastacross every target, to establish what the integration suite actually does once it compiles: 911 passed, 11 failed, 8 ignored.🤖 Generated with Claude Code