Compare commits

...

2 Commits

Author SHA1 Message Date
github-ops 4fa768cc29 deploy: use external postgres
Deploy / deploy (push) Successful in 23s
CI / Rust Checks (push) Successful in 5m4s
CI / UI Checks (push) Successful in 5s
CI / Deployment Manifests (push) Successful in 3s
CI / Frontend E2E (push) Successful in 3m55s
2026-06-16 22:32:40 +00:00
github-ops b7f3bb5725 ci: reduce runner load 2026-06-16 22:15:45 +00:00
4 changed files with 19 additions and 37 deletions
+11 -9
View File
@@ -7,6 +7,11 @@ on:
- main - main
- "feat/**" - "feat/**"
env:
CARGO_BUILD_JOBS: "2"
CARGO_INCREMENTAL: "0"
RUST_TEST_THREADS: "2"
jobs: jobs:
rust: rust:
name: Rust Checks name: Rust Checks
@@ -41,18 +46,16 @@ jobs:
- name: Check formatting - name: Check formatting
run: cargo fmt --all --check run: cargo fmt --all --check
- name: Check workspace
run: cargo check --workspace
- name: Run clippy - name: Run clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings run: cargo clippy --workspace --all-targets --all-features --jobs "$CARGO_BUILD_JOBS" -- -D warnings
- name: Run tests - name: Run tests
run: cargo test --workspace --all-targets run: cargo test --workspace --all-targets --jobs "$CARGO_BUILD_JOBS"
ui: ui:
name: UI Checks name: UI Checks
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: rust
steps: steps:
- name: Checkout - name: Checkout
@@ -72,12 +75,10 @@ jobs:
working-directory: apps/ui working-directory: apps/ui
run: npm run build run: npm run build
- name: Build UI image
run: docker build -f apps/ui/Dockerfile .
frontend-e2e: frontend-e2e:
name: Frontend E2E name: Frontend E2E
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: ui
services: services:
crank-e2e-postgres: crank-e2e-postgres:
image: postgres:16-alpine image: postgres:16-alpine
@@ -119,7 +120,7 @@ jobs:
run: npx playwright install --with-deps chromium run: npx playwright install --with-deps chromium
- name: Prebuild e2e services - name: Prebuild e2e services
run: cargo build -p admin-api -p mcp-server run: cargo build -p admin-api -p mcp-server --jobs "$CARGO_BUILD_JOBS"
- name: Run Playwright e2e - name: Run Playwright e2e
working-directory: apps/ui working-directory: apps/ui
@@ -133,6 +134,7 @@ jobs:
deployment: deployment:
name: Deployment Manifests name: Deployment Manifests
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: ui
steps: steps:
- name: Checkout - name: Checkout
+5 -1
View File
@@ -103,7 +103,11 @@ jobs:
append_if_set POSTGRES_USER "$POSTGRES_USER" append_if_set POSTGRES_USER "$POSTGRES_USER"
append_if_set POSTGRES_PASSWORD "$POSTGRES_PASSWORD" append_if_set POSTGRES_PASSWORD "$POSTGRES_PASSWORD"
append_if_set POSTGRES_HOST "$POSTGRES_HOST" append_if_set POSTGRES_HOST "$POSTGRES_HOST"
append_if_set POSTGRES_PORT "$POSTGRES_PORT" if [ -n "${POSTGRES_PORT:-}" ]; then
append_if_set POSTGRES_PORT "$POSTGRES_PORT"
elif [ -n "${PGBOUNCER_PORT:-}" ]; then
append_if_set POSTGRES_PORT "$PGBOUNCER_PORT"
fi
append_if_set CRANK_STORAGE_ROOT "$CRANK_STORAGE_ROOT" append_if_set CRANK_STORAGE_ROOT "$CRANK_STORAGE_ROOT"
append_if_set CRANK_PUBLISH_BIND "$CRANK_PUBLISH_BIND" append_if_set CRANK_PUBLISH_BIND "$CRANK_PUBLISH_BIND"
append_if_set CRANK_ADMIN_BIND "$CRANK_ADMIN_BIND" append_if_set CRANK_ADMIN_BIND "$CRANK_ADMIN_BIND"
+1 -1
View File
@@ -1,7 +1,7 @@
POSTGRES_DB=crank POSTGRES_DB=crank
POSTGRES_USER=crank POSTGRES_USER=crank
POSTGRES_PASSWORD=change-me POSTGRES_PASSWORD=change-me
POSTGRES_HOST=postgres POSTGRES_HOST=postgres.example.internal
POSTGRES_PORT=5432 POSTGRES_PORT=5432
POSTGRES_MAX_CONNECTIONS=20 POSTGRES_MAX_CONNECTIONS=20
POSTGRES_MIN_CONNECTIONS=2 POSTGRES_MIN_CONNECTIONS=2
+2 -26
View File
@@ -1,21 +1,4 @@
services: services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-crank}
POSTGRES_USER: ${POSTGRES_USER:-crank}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-crank}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "127.0.0.1:5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-crank} -d ${POSTGRES_DB:-crank}"]
interval: 10s
timeout: 5s
retries: 5
valkey: valkey:
image: valkey/valkey:8-alpine image: valkey/valkey:8-alpine
restart: unless-stopped restart: unless-stopped
@@ -39,7 +22,7 @@ services:
dockerfile: apps/admin-api/Dockerfile dockerfile: apps/admin-api/Dockerfile
restart: unless-stopped restart: unless-stopped
environment: environment:
POSTGRES_HOST: ${POSTGRES_HOST:-postgres} POSTGRES_HOST: ${POSTGRES_HOST}
POSTGRES_PORT: ${POSTGRES_PORT:-5432} POSTGRES_PORT: ${POSTGRES_PORT:-5432}
POSTGRES_DB: ${POSTGRES_DB:-crank} POSTGRES_DB: ${POSTGRES_DB:-crank}
POSTGRES_USER: ${POSTGRES_USER:-crank} POSTGRES_USER: ${POSTGRES_USER:-crank}
@@ -59,9 +42,6 @@ services:
CRANK_BOOTSTRAP_ADMIN_PASSWORD: ${CRANK_BOOTSTRAP_ADMIN_PASSWORD} CRANK_BOOTSTRAP_ADMIN_PASSWORD: ${CRANK_BOOTSTRAP_ADMIN_PASSWORD}
CRANK_BOOTSTRAP_ADMIN_DISPLAY_NAME: ${CRANK_BOOTSTRAP_ADMIN_DISPLAY_NAME:-Crank Owner} CRANK_BOOTSTRAP_ADMIN_DISPLAY_NAME: ${CRANK_BOOTSTRAP_ADMIN_DISPLAY_NAME:-Crank Owner}
CRANK_DEMO_SEED: ${CRANK_DEMO_SEED:-false} CRANK_DEMO_SEED: ${CRANK_DEMO_SEED:-false}
depends_on:
postgres:
condition: service_healthy
volumes: volumes:
- artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage} - artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}
ports: ports:
@@ -79,7 +59,7 @@ services:
dockerfile: apps/mcp-server/Dockerfile dockerfile: apps/mcp-server/Dockerfile
restart: unless-stopped restart: unless-stopped
environment: environment:
POSTGRES_HOST: ${POSTGRES_HOST:-postgres} POSTGRES_HOST: ${POSTGRES_HOST}
POSTGRES_PORT: ${POSTGRES_PORT:-5432} POSTGRES_PORT: ${POSTGRES_PORT:-5432}
POSTGRES_DB: ${POSTGRES_DB:-crank} POSTGRES_DB: ${POSTGRES_DB:-crank}
POSTGRES_USER: ${POSTGRES_USER:-crank} POSTGRES_USER: ${POSTGRES_USER:-crank}
@@ -93,9 +73,6 @@ services:
CRANK_LOG_LEVEL: ${CRANK_LOG_LEVEL:-info} CRANK_LOG_LEVEL: ${CRANK_LOG_LEVEL:-info}
CRANK_MASTER_KEY: ${CRANK_MASTER_KEY} CRANK_MASTER_KEY: ${CRANK_MASTER_KEY}
CRANK_BASE_URL: ${CRANK_BASE_URL:-http://localhost:3000} CRANK_BASE_URL: ${CRANK_BASE_URL:-http://localhost:3000}
depends_on:
postgres:
condition: service_healthy
volumes: volumes:
- artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage} - artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}
ports: ports:
@@ -121,6 +98,5 @@ services:
retries: 5 retries: 5
volumes: volumes:
postgres_data:
artifact_storage: artifact_storage:
valkey_data: valkey_data: