Add global lock to serialize CI runs across branches
Multiple simultaneous test runs compete for PostgreSQL connections, causing spurious errors. Global flock ensures one branch runs at a time. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b8c4fe7cc2
commit
ec02b57adc
@ -31,6 +31,11 @@ if ! flock -n 200; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Serialize all CI runs to avoid DB connection contention
|
||||
GLOBAL_LOCK="/tmp/tsharps-ci-global.lock"
|
||||
exec 201>"$GLOBAL_LOCK"
|
||||
flock 201
|
||||
|
||||
echo "=== TSHARPS CI Runner ==="
|
||||
echo "Branch: $BRANCH"
|
||||
echo "Commit: $COMMIT"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user