removes 'docker run' usages
Some checks failed
Dotnet build and test / build (pull_request) Failing after 18s

This commit is contained in:
Paul Schneider 2026-11-10 14:59:40 +00:00
commit 737145dd2c
Signed by: notazof
GPG key ID: AD4B9B545FBD7D12

View file

@ -28,6 +28,20 @@ jobs:
runs-on: docker
container:
image: pazof/yavsc-build-env:debian13-dotnet10-android36-jdk21-v5
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 55432:5432
options: >-
--health-cmd="pg_isready -U postgres -d postgres"
--health-interval=10s
--health-timeout=5s
--health-retries=5
steps:
- name: Clone yavsc
run: |
@ -51,32 +65,6 @@ jobs:
run: |
echo "🏗️ Building the solution..."
cd /src/_src && dotnet build --verbosity normal
- name: Start PostgreSQL
run: |
set -e
echo "🐘 Starting local PostgreSQL..."
if docker ps -a --format '{{.Names}}' | grep -qx 'yavsc-ci-postgres'; then
echo "PostgreSQL container already exists; restarting it"
docker rm -f yavsc-ci-postgres >/dev/null 2>&1 || true
fi
docker run -d \
--name yavsc-ci-postgres \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_DB=postgres \
-p 55432:5432 \
postgres:16
for i in $(seq 1 40); do
if pg_isready -h 127.0.0.1 -p 55432 -U postgres >/dev/null 2>&1; then
echo "✅ PostgreSQL is ready"
exit 0
fi
echo "PostgreSQL not ready yet ($i/40)"
sleep 2
done
echo "❌ PostgreSQL did not become ready in time" >&2
docker logs yavsc-ci-postgres || true
exit 1
- name: Test
env:
YAVSC_API_TEST_DB_PROVIDER: npgsql