Skip to content

Commit c6bbef1

Browse files
committed
update README and add target make test
1 parent 31dfe0d commit c6bbef1

File tree

3 files changed

+38
-8
lines changed

3 files changed

+38
-8
lines changed
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
[
22
{
33
"language": "php",
4-
"versions": ["8.2"],
5-
"always-run-versions": ["8.2"]
4+
"versions": [
5+
"8.2",
6+
"8.3"
7+
],
8+
"always-run-versions": [
9+
"8.2",
10+
"8.3"
11+
]
612
}
713
]

Makefile.frag

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,34 @@ clean-asan:
317317
@rm -rf asan_logs
318318
@$(MAKE) clean
319319

320+
test:
321+
@echo "Running ValkeyGlide tests..."
322+
@if [ ! -f "$(CURDIR)/modules/valkey_glide.so" ]; then \
323+
echo "❌ ERROR: Extension not found at $(CURDIR)/modules/valkey_glide.so"; \
324+
echo "Please build the extension first with: make"; \
325+
exit 1; \
326+
fi
327+
@if [ ! -f "tests/TestValkeyGlide.php" ]; then \
328+
echo "❌ ERROR: Test file not found at tests/TestValkeyGlide.php"; \
329+
exit 1; \
330+
fi
331+
@if [ ! -f "tests/start_valkey_with_replicas.sh" ]; then \
332+
echo "❌ ERROR: Setup script not found at tests/start_valkey_with_replicas.sh"; \
333+
exit 1; \
334+
fi
335+
@if [ ! -f "tests/create-valkey-cluster.sh" ]; then \
336+
echo "❌ ERROR: Setup script not found at tests/create-valkey-cluster.sh"; \
337+
exit 1; \
338+
fi
339+
@echo "Setting up Valkey infrastructure..."
340+
@echo "Starting Valkey with replicas..."
341+
@cd tests && ./start_valkey_with_replicas.sh
342+
@echo "Creating Valkey cluster..."
343+
@cd tests && ./create-valkey-cluster.sh
344+
@echo "Running PHP tests..."
345+
php -n -d extension=./modules/valkey_glide.so tests/TestValkeyGlide.php
346+
@echo "✓ Tests completed"
347+
320348
help-asan:
321349
@echo "ASAN (AddressSanitizer) targets (macOS only):"
322350
@echo " build-asan - Build extension with AddressSanitizer enabled"
@@ -334,4 +362,4 @@ help-asan:
334362
@echo ""
335363
@echo "Note: ASAN tests are only supported on macOS. Linux support has been removed."
336364

337-
.PHONY: lint lint-c lint-php lint-fix install-build-tools install-lint-tools install-tools build-asan test-asan clean-asan help-asan
365+
.PHONY: lint lint-c lint-php lint-fix install-build-tools install-lint-tools install-tools build-asan test-asan clean-asan help-asan test

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,9 @@ Valkey General Language Independent Driver for the Enterprise (GLIDE) is the off
1919
- **Backed and Supported by AWS and GCP**: Ensuring robust support and continuous improvement of the project.
2020

2121
## Key Features
22-
- **[AZ Affinity](https://valkey.io/blog/az-affinity-strategy/)** – Ensures low-latency connections and minimal cross-zone costs by routing read traffic to replicas in the clients availability zone. **(Requires Valkey server version 8.0+ or AWS ElastiCache for Valkey 7.2+)**.
23-
- **[PubSub Auto-Reconnection](https://github.com/valkey-io/valkey-glide/wiki/General-Concepts#pubsub-support:~:text=PubSub%20Support,Receiving%2C%20and%20Unsubscribing.)** – Seamless background resubscription on topology updates or disconnection.
24-
- **[Sharded PubSub](https://github.com/valkey-io/valkey-glide/wiki/General-Concepts#pubsub-support:~:text=Receiving%2C%20and%20Unsubscribing.-,Subscribing,routed%20to%20the%20server%20holding%20the%20slot%20for%20the%20command%27s%20channel.,-Receiving)** – Native support for sharded PubSub across cluster slots.
2522
- **[Cluster-Aware MGET/MSET/DEL/FLUSHALL](https://github.com/valkey-io/valkey-glide/wiki/General-Concepts#multi-slot-command-handling:~:text=Multi%2DSlot%20Command%20Execution,JSON.MGET)** – Execute multi-key commands across cluster slots without manual key grouping.
2623
- **[Cluster Scan](https://github.com/valkey-io/valkey-glide/wiki/General-Concepts#cluster-scan)** – Unified key iteration across shards using a consistent, high-level API for cluster environments.
27-
- **[Batching (Pipeline and Transaction)](https://github.com/valkey-io/valkey-glide/wiki/General-Concepts#batching-pipeline-and-transaction)** – Efficiently execute multiple commands in a single network roundtrip, significantly reducing latency and improving throughput.
28-
- **[OpenTelemetry](https://github.com/valkey-io/valkey-glide/wiki/General-Concepts#opentelemetry)** – Integrated tracing support for enhanced observability and easier debugging in distributed environments.
24+
2925

3026
## Supported Engine Versions
3127

0 commit comments

Comments
 (0)