Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.test.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Supabase Configuration
VITE_SUPABASE_URL=http://localhost:54321
VITE_SUPABASE_ANON_KEY=your_anon_key_here
VITE_SUPABASE_PUBLISHABLE_KEY=your_anon_key_here
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key_here

# Database Configuration
Expand Down
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ volta install node
# Extract Supabase URL
echo "VITE_SUPABASE_URL=http://localhost:54321" > .env.local

# Extract and add Supabase anon key
echo "VITE_SUPABASE_ANON_KEY=$(supabase status | grep "anon key:" | awk '{print $3}')" >> .env.local
# Extract and add Supabase Publishable key
echo "VITE_SUPABASE_PUBLISHABLE_KEY=$(supabase status | grep "Publishable key:" | awk '{print $3}')" >> .env.local
```

2. Install dependencies: `npm install --legacy-peer-deps`
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- name: Run linter
run: npm run lint

- name: Build project
run: npm run build

Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
cat > .env.test << EOF
# Test Environment Configuration for CI
VITE_SUPABASE_URL=http://localhost:54321
VITE_SUPABASE_ANON_KEY=ANON_KEY_PLACEHOLDER
VITE_SUPABASE_PUBLISHABLE_KEY=ANON_KEY_PLACEHOLDER
SUPABASE_SERVICE_ROLE_KEY=SERVICE_KEY_PLACEHOLDER
TEST_DATABASE_URL=postgresql://postgres:postgres@localhost:54322/postgres
EOF
Expand All @@ -100,19 +100,19 @@ jobs:
echo "🚀 Starting Supabase services..."
${{ env.SUPABASE_CMD }} start
echo "✅ Supabase started successfully"
- name: Update environment with actual keys
run: |
echo "🔑 Extracting API keys..."
ANON_KEY=$(${{ env.SUPABASE_CMD }} status | grep "anon key" | awk '{print $3}')
SERVICE_KEY=$(${{ env.SUPABASE_CMD }} status | grep "service_role key" | awk '{print $3}')
ANON_KEY=$(${{ env.SUPABASE_CMD }} status -o json | grep '"PUBLISHABLE_KEY"' | sed 's/.*: "\(.*\)".*/\1/')
SERVICE_KEY=$(${{ env.SUPABASE_CMD }} status -o json | grep '"SERVICE_ROLE_KEY"' | sed 's/.*: "\(.*\)".*/\1/')
echo "Anon key length: ${#ANON_KEY}"
echo "Service key length: ${#SERVICE_KEY}"
sed -i "s/ANON_KEY_PLACEHOLDER/$ANON_KEY/g" .env.test
sed -i "s/SERVICE_KEY_PLACEHOLDER/$SERVICE_KEY/g" .env.test
echo "✅ Environment updated with actual keys"
- name: Load test environment
Expand Down
Loading