Try fixing CI
This commit is contained in:
parent
75583dedbe
commit
535169a039
4 changed files with 26 additions and 3 deletions
|
|
@ -53,4 +53,3 @@ scripts/e2e.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
And to clean up the logs & database files, run `scripts/clean-up.sh`
|
And to clean up the logs & database files, run `scripts/clean-up.sh`
|
||||||
```
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
"build": "npm run build --workspaces",
|
"build": "npm run build --workspaces",
|
||||||
"dev": "concurrently --kill-others \"npm run dev -w sync-client\" \"npm run dev -w obsidian-plugin\"",
|
"dev": "concurrently --kill-others \"npm run dev -w sync-client\" \"npm run dev -w obsidian-plugin\"",
|
||||||
"test": "npm run test --workspaces",
|
"test": "npm run test --workspaces",
|
||||||
"lint": "eslint --fix sync-client obsidian-plugin test-client && prettier --write \"**/*.(ts|scss|json|html)\"",
|
"lint": "eslint --fix sync-client obsidian-plugin test-client && prettier --write \"**/*.ts\"",
|
||||||
"update": "ncu -u -ws"
|
"update": "ncu -u -ws"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
@ -27,4 +27,4 @@
|
||||||
"prettier": "^3.5.3",
|
"prettier": "^3.5.3",
|
||||||
"typescript-eslint": "8.26.1"
|
"typescript-eslint": "8.26.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -17,6 +17,8 @@ mkdir -p logs
|
||||||
cd frontend
|
cd frontend
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
|
./scripts/wait-for-server.sh
|
||||||
|
|
||||||
pids=()
|
pids=()
|
||||||
for i in $(seq 1 $process_count); do
|
for i in $(seq 1 $process_count); do
|
||||||
node test-client/dist/cli.js > "../logs/log_${i}.log" 2>&1 &
|
node test-client/dist/cli.js > "../logs/log_${i}.log" 2>&1 &
|
||||||
|
|
|
||||||
22
scripts/wait-for-server.sh
Executable file
22
scripts/wait-for-server.sh
Executable file
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
SERVER_URL="http://localhost:3000"
|
||||||
|
MAX_RETRIES=30
|
||||||
|
RETRY_INTERVAL_IN_SECONDS=5
|
||||||
|
|
||||||
|
echo "Waiting for $SERVER_URL to become available..."
|
||||||
|
count=0
|
||||||
|
while [ $count -lt $MAX_RETRIES ]; do
|
||||||
|
if curl -s -f -o /dev/null $SERVER_URL; then
|
||||||
|
echo "$SERVER_URL is now available!"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
echo "Attempt $(($count+1))/$MAX_RETRIES: $SERVER_URL not available yet, retrying in ${RETRY_INTERVAL_IN_SECONDS}s..."
|
||||||
|
sleep $RETRY_INTERVAL_IN_SECONDS
|
||||||
|
count=$(($count+1))
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $count -eq $MAX_RETRIES ]; then
|
||||||
|
echo "Error: $SERVER_URL did not become available after $MAX_RETRIES attempts."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
Loading…
Add table
Add a link
Reference in a new issue