mirror of
https://github.com/atuinsh/atuin.git
synced 2026-10-11 22:29:51 +00:00
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]>
22 lines
611 B
Bash
Executable File
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
|