Skip to content

Commit

Permalink
Refactor: Update endpoint testing to skip config packages and improve…
Browse files Browse the repository at this point in the history
… service name extraction; modify Redis client configuration to use centralized config
  • Loading branch information
Luisotee committed Jan 22, 2025
1 parent b5080b0 commit 96a14e2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/stacks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ jobs:
- name: Test endpoints
run: |
while IFS= read -r dir; do
service_name=$(basename "$dir")
echo "Testing endpoints for $dir"
# Extract service name by removing "deploy/" and "-stack"
service_name=$(basename "$dir" | sed 's/-stack//')
echo "Testing endpoints for service: $service_name"
# Skip config packages
if [[ "$service_name" == *"config"* ]]; then
if [[ "$service_name" == "config" ]]; then
echo "Skipping config package: $service_name"
continue
fi
Expand Down
9 changes: 5 additions & 4 deletions packages/kv/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import "server-only";

import { Redis } from "@upstash/redis";
import "server-only";
//@ts-ignore
import { config } from "@eda/config";

export const client = new Redis({
url: process.env.UPSTASH_REDIS_REST_URL!,
token: process.env.UPSTASH_REDIS_REST_TOKEN!,
url: config.services.upstash.redis_url,
token: config.services.upstash.redis_token,
});

0 comments on commit 96a14e2

Please sign in to comment.