Commit 48a8b3f
committed
fix: repair CI pipeline — Rust 1.85, SQLite test isolation, missing model imports
### Problems Fixed
**1. Contracts Check (Anchor) — edition2024 error**
`clap_lex-1.1.0` requires Cargo feature `edition2024`, which is not
available in Rust 1.76. Updated to Rust 1.85 in both `ci.yml` and
`contracts/rust-toolchain.toml`.
**2. Backend Tests (pytest) — 204 failures, 125 errors**
Root causes:
- CI injected `DATABASE_URL=postgresql://...` as step-level env,
conflicting with conftest.py's SQLite override. Removed the Postgres
env vars and service — tests use in-memory SQLite as conftest intends.
- Three model files with DB tables (`contributor_webhook`,
`wallet_session`, `webhook_log`) were not imported in `init_db()`,
so their tables were never created by `create_all()`.
- `init_db()` silently swallowed all exceptions, causing missing-table
errors to cascade as hundreds of unrelated test failures. Now re-raises
in CI/test environments for immediate, clear failure.
### Changes
- `.github/workflows/ci.yml`: Rust 1.76 → 1.85, remove Postgres service
and DATABASE_URL override
- `backend/app/database.py`: Add missing model imports, fail-fast in CI
- `contracts/rust-toolchain.toml`: Channel 1.76 → 1.851 parent 72d63b0 commit 48a8b3f
File tree
3 files changed
+11
-18
lines changed- .github/workflows
- backend/app
- contracts
3 files changed
+11
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | 48 | | |
63 | 49 | | |
64 | 50 | | |
| |||
82 | 68 | | |
83 | 69 | | |
84 | 70 | | |
85 | | - | |
86 | | - | |
87 | 71 | | |
88 | 72 | | |
89 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
176 | 177 | | |
177 | 178 | | |
178 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
179 | 183 | | |
180 | 184 | | |
181 | 185 | | |
182 | 186 | | |
183 | 187 | | |
184 | 188 | | |
185 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
186 | 195 | | |
187 | 196 | | |
188 | 197 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
0 commit comments