3 Commits

Author SHA1 Message Date
0624795370 CI: Restore Postgres to services, use service name as hostname
Some checks failed
Pipeline / UI Lint (push) Successful in 57s
Pipeline / API Unit Tests (push) Successful in 13s
Pipeline / API Lint (push) Successful in 5s
Pipeline / UI Tests (push) Successful in 1m33s
Pipeline / API Integration Tests (push) Failing after 38s
Pipeline / Build & Push API Image (push) Has been skipped
Pipeline / Build & Push UI Image (push) Has been skipped
Gitea runs jobs in containers, so service containers are networked by
name (same as GitHub Actions with container:). Postgres goes back into
services: and is addressed as 'postgres', not localhost. MinIO stays
as a manual docker run with --network container:$(hostname) since it
needs `server /data` and is addressed as localhost.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 22:54:05 +00:00
e4a77fdea3 CI: Move Postgres to manual docker run with shared network namespace
Service containers bind ports to the host, not to localhost inside the
job container. Start both Postgres and MinIO manually with
--network container:$(hostname) so they share the job container's
network namespace and are reachable on localhost. Use docker exec for
pg_isready to avoid depending on postgresql-client in the runner image.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 22:52:14 +00:00
22e8717e0c Chore: Exclude alembic/ from Ruff linting
Alembic scaffolds migration files from its own template which uses
pre-3.10 conventions (Union[X, Y], typing.Sequence, etc). Excluding
avoids noise on every new migration without affecting app code coverage.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 22:50:05 +00:00
2 changed files with 4 additions and 5 deletions

View File

@@ -121,8 +121,6 @@ jobs:
POSTGRES_USER: reactbin POSTGRES_USER: reactbin
POSTGRES_PASSWORD: reactbin POSTGRES_PASSWORD: reactbin
POSTGRES_DB: reactbin_test POSTGRES_DB: reactbin_test
ports:
- 5432:5432
options: >- options: >-
--health-cmd pg_isready --health-cmd pg_isready
--health-interval 5s --health-interval 5s
@@ -166,8 +164,8 @@ jobs:
run: uv run pytest tests/integration/ -q run: uv run pytest tests/integration/ -q
working-directory: api working-directory: api
env: env:
TEST_DATABASE_URL: postgresql+asyncpg://reactbin:reactbin@localhost/reactbin_test TEST_DATABASE_URL: postgresql+asyncpg://reactbin:reactbin@postgres/reactbin_test
DATABASE_URL: postgresql+asyncpg://reactbin:reactbin@localhost/reactbin_test DATABASE_URL: postgresql+asyncpg://reactbin:reactbin@postgres/reactbin_test
S3_ENDPOINT_URL: http://localhost:9000 S3_ENDPOINT_URL: http://localhost:9000
S3_BUCKET_NAME: reactbin-test S3_BUCKET_NAME: reactbin-test
S3_ACCESS_KEY_ID: minioadmin S3_ACCESS_KEY_ID: minioadmin
@@ -180,7 +178,7 @@ jobs:
- name: Stop MinIO - name: Stop MinIO
if: always() if: always()
run: docker stop ci-minio && docker rm ci-minio || true run: docker stop ci-minio || true && docker rm ci-minio || true
# ── Image builds (tag-only, gated on all jobs) ──────────────────────────────── # ── Image builds (tag-only, gated on all jobs) ────────────────────────────────

View File

@@ -30,6 +30,7 @@ dev = [
[tool.ruff] [tool.ruff]
line-length = 100 line-length = 100
target-version = "py312" target-version = "py312"
exclude = ["alembic/"]
[tool.ruff.lint] [tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM"] select = ["E", "F", "I", "UP", "B", "SIM"]