Skip to content

Commit a90cae1

Browse files
committed
Simplify CI to run all tests in single job
- Use --include-ignored to run both fast and slow tests in one pass - Add 15 minute timeout to test job - Remove duplicate integration-test job - Add test-all and test-minio-all Makefile targets
1 parent 382c721 commit a90cae1

File tree

3 files changed

+16
-61
lines changed

3 files changed

+16
-61
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -44,60 +44,6 @@ jobs:
4444
test:
4545
name: Test
4646
runs-on: ubuntu-latest
47-
env:
48-
AWS_SDK_LOAD_CONFIG: "false"
49-
AWS_ENDPOINT_URL: http://127.0.0.1:9000
50-
AWS_REGION: us-east-1
51-
AWS_S3_BUCKET: timefusion-test
52-
AWS_S3_ENDPOINT: http://127.0.0.1:9000
53-
AWS_ALLOW_HTTP: "true"
54-
AWS_ACCESS_KEY_ID: minioadmin
55-
AWS_SECRET_ACCESS_KEY: minioadmin
56-
PGWIRE_PORT: "12345"
57-
PORT: "8080"
58-
TIMEFUSION_TABLE_PREFIX: timefusion-ci-test
59-
BATCH_INTERVAL_MS: "1000"
60-
MAX_BATCH_SIZE: "1000"
61-
ENABLE_BATCH_QUEUE: "true"
62-
MAX_PG_CONNECTIONS: "100"
63-
AWS_S3_LOCKING_PROVIDER: ""
64-
TIMEFUSION_FOYER_MEMORY_MB: "256"
65-
TIMEFUSION_FOYER_DISK_GB: "10"
66-
TIMEFUSION_FOYER_TTL_SECONDS: "300"
67-
TIMEFUSION_FOYER_SHARDS: "8"
68-
steps:
69-
- name: Free disk space
70-
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
71-
- uses: actions/checkout@v4
72-
- uses: dtolnay/rust-toolchain@stable
73-
- uses: Swatinem/rust-cache@v2
74-
75-
- name: Start MinIO
76-
run: |
77-
docker run -d -p 9000:9000 --name minio \
78-
-e MINIO_ROOT_USER=minioadmin \
79-
-e MINIO_ROOT_PASSWORD=minioadmin \
80-
minio/minio server /data
81-
sleep 5
82-
until curl -sf http://localhost:9000/minio/health/live; do sleep 1; done
83-
84-
- name: Install AWS CLI
85-
run: |
86-
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
87-
unzip -q awscliv2.zip
88-
sudo ./aws/install --update
89-
90-
- name: Create MinIO bucket
91-
run: |
92-
aws --endpoint-url http://127.0.0.1:9000 s3 mb s3://timefusion-test || true
93-
aws --endpoint-url http://127.0.0.1:9000 s3 mb s3://timefusion-tests || true
94-
95-
- name: Run tests
96-
run: cargo test --all-features
97-
98-
integration-test:
99-
name: Integration Tests
100-
runs-on: ubuntu-latest
10147
timeout-minutes: 15
10248
env:
10349
AWS_SDK_LOAD_CONFIG: "false"
@@ -110,7 +56,7 @@ jobs:
11056
AWS_SECRET_ACCESS_KEY: minioadmin
11157
PGWIRE_PORT: "12345"
11258
PORT: "8080"
113-
TIMEFUSION_TABLE_PREFIX: timefusion-ci-integration
59+
TIMEFUSION_TABLE_PREFIX: timefusion-ci-test
11460
BATCH_INTERVAL_MS: "1000"
11561
MAX_BATCH_SIZE: "1000"
11662
ENABLE_BATCH_QUEUE: "true"
@@ -147,5 +93,5 @@ jobs:
14793
aws --endpoint-url http://127.0.0.1:9000 s3 mb s3://timefusion-test || true
14894
aws --endpoint-url http://127.0.0.1:9000 s3 mb s3://timefusion-tests || true
14995
150-
- name: Run integration tests
151-
run: cargo test --test integration_test --test sqllogictest -- --ignored
96+
- name: Run all tests
97+
run: cargo test --all-features -- --include-ignored

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ arrow = "57.1.0"
1010
arrow-json = "57.1.0"
1111
uuid = { version = "1.17", features = ["v4", "serde"] }
1212
serde = { version = "1", features = ["derive"] }
13-
serde_arrow = { version = "0.13.4", features = ["arrow-55"] }
13+
serde_arrow = { version = "0.13.7", features = ["arrow-57"] }
1414
serde_json = "1.0.141"
1515
serde_with = "3.14"
1616
serde_yaml = "0.9"

Makefile

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
1-
.PHONY: test test-ovh test-minio test-prod test-integration test-integration-minio run-prod build-prod minio-start minio-stop minio-clean
1+
.PHONY: test test-all test-ovh test-minio test-minio-all test-prod test-integration test-integration-minio run-prod build-prod minio-start minio-stop minio-clean
22

3-
# Default test with MinIO/test environment (uses .env)
3+
# Default test (fast, excludes slow integration tests)
44
test:
55
cargo test $${ARGS}
66

7+
# Run all tests including slow integration tests
8+
test-all:
9+
@export $$(cat .env | grep -v '^#' | xargs) && cargo test -- --include-ignored $${ARGS}
10+
711
# Explicit test with OVH/S3
812
test-ovh:
913
@echo "Testing with OVH/S3..."
1014
@export $$(cat .env | grep -v '^#' | xargs) && cargo test $${ARGS}
1115

12-
# Test with MinIO
16+
# Test with MinIO (fast, excludes slow integration tests)
1317
test-minio:
1418
@echo "Testing with MinIO..."
1519
@export $$(cat .env.minio | grep -v '^#' | xargs) && cargo test $${ARGS}
1620

21+
# Test with MinIO including all tests (same as CI)
22+
test-minio-all:
23+
@echo "Testing all with MinIO (including integration tests)..."
24+
@export $$(cat .env.minio | grep -v '^#' | xargs) && cargo test -- --include-ignored $${ARGS}
25+
1726
# Test with production config (be careful!)
1827
test-prod:
1928
@echo "WARNING: Testing with PRODUCTION credentials!"

0 commit comments

Comments
 (0)