1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: CI
on:
push:
branches:
pull_request:
branches:
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo build --workspace --all-targets
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all --check
- run: cargo clippy --workspace --all-targets --all-features -- -D warnings
run_tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
# Hermetic default suite: no external services required.
- run: cargo test --workspace
env:
LOGLEVEL: WARN
integration_live_services:
name: Integration (live services)
runs-on: ubuntu-latest
services:
# Credentials must match the code's env-driven config defaults
# (MONGODB_URI / REDIS_* / CLICKHOUSE_* in src/infrastructure/config/*),
# so the ignored live tests authenticate successfully and can ASSERT
# success instead of tolerating connection failures.
mongodb:
image: mongo:7
env:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: password
ports:
- 27017:27017
redis:
image: redis:7.4
ports:
- 6379:6379
clickhouse:
image: clickhouse/clickhouse-server:24.8
env:
CLICKHOUSE_USER: admin
CLICKHOUSE_PASSWORD: password
ports:
- 8123:8123
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
# Live-service tests are #[ignore]d in the default suite; run them here.
- run: cargo test --workspace -- --ignored
env:
LOGLEVEL: WARN
MONGODB_URI: mongodb://admin:password@localhost:27017