-
Notifications
You must be signed in to change notification settings - Fork 7
94 lines (87 loc) · 2.61 KB
/
ci.yml
File metadata and controls
94 lines (87 loc) · 2.61 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: CI
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --all --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-targets --all-features -- -D warnings
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo check --all-targets --all-features
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 15
env:
AWS_SDK_LOAD_CONFIG: "false"
AWS_ENDPOINT_URL: http://127.0.0.1:9000
AWS_REGION: us-east-1
AWS_S3_BUCKET: timefusion-test
AWS_S3_ENDPOINT: http://127.0.0.1:9000
AWS_ALLOW_HTTP: "true"
AWS_ACCESS_KEY_ID: minioadmin
AWS_SECRET_ACCESS_KEY: minioadmin
PGWIRE_PORT: "12345"
PORT: "8080"
TIMEFUSION_TABLE_PREFIX: timefusion-ci-test
BATCH_INTERVAL_MS: "1000"
MAX_BATCH_SIZE: "1000"
ENABLE_BATCH_QUEUE: "true"
MAX_PG_CONNECTIONS: "100"
AWS_S3_LOCKING_PROVIDER: ""
WALRUS_DATA_DIR: /tmp/walrus-wal
# Use small cache sizes for CI tests (similar to test_config in object_store_cache.rs)
TIMEFUSION_FOYER_MEMORY_MB: "10"
TIMEFUSION_FOYER_DISK_MB: "50"
TIMEFUSION_FOYER_METADATA_MEMORY_MB: "10"
TIMEFUSION_FOYER_METADATA_DISK_MB: "50"
TIMEFUSION_FOYER_SHARDS: "2"
services:
minio:
image: public.ecr.aws/bitnami/minio:latest
ports:
- 9000:9000
env:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
MINIO_DEFAULT_BUCKETS: timefusion-test,timefusion-tests
options: >-
--health-cmd "curl -f http://localhost:9000/minio/health/live || exit 1"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Free disk space
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run all tests
run: cargo test --all-features