Files
atuin/.buildkite/scripts/start-postgres.sh
T
Ellie HuxtableandClaude Opus 5.5 c7f0318eb3 ci: run CI on Buildkite (#4274)
Move atuin's CI over to Buildkite. I've removed a few jobs from branches
and pushed them onto main, mostly things like the nixos build, illumos
etc - they were really slow, and difficult to optimise.

The goal is to be on buildkit, and have CI take around a minute per
commit. Once we have more tests, we can keep parallelizing

I tested out both the nvme disks and the buildkite cache. The former is
much faster, but is trickier to isolate across branches. I would prefer
that there is 0 chance of a branch messing with a build on main, or with
another branch.

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-26 17:45:57 -07:00

22 lines
611 B
Bash
Executable File

#!/usr/bin/env bash
# Starts Postgres for the integration tests on localhost:5432 (the
# ATUIN_DB_URI the step sets) and waits until it accepts connections.
set -euo pipefail
echo "--- :postgres: Starting Postgres"
docker run -d --name postgres \
-e POSTGRES_USER=atuin -e POSTGRES_PASSWORD=pass -e POSTGRES_DB=atuin \
-p 5432:5432 \
postgres:18-alpine >/dev/null
for _ in $(seq 1 30); do
if docker exec postgres pg_isready -U atuin >/dev/null 2>&1; then
echo "Postgres is ready"
exit 0
fi
sleep 1
done
docker logs postgres
echo "+++ :rotating_light: Postgres did not become ready"
exit 1