CI: Fix API jobs — drop container override, replace bitnami/minio
Some checks failed
Pipeline / UI Lint (push) Successful in 57s
Pipeline / API Unit Tests (push) Failing after 5s
Pipeline / API Lint (push) Failing after 3s
Pipeline / UI Tests (push) Successful in 1m30s
Pipeline / Build & Push API Image (push) Has been cancelled
Pipeline / Build & Push UI Image (push) Has been cancelled
Pipeline / API Integration Tests (push) Has been cancelled
Some checks failed
Pipeline / UI Lint (push) Successful in 57s
Pipeline / API Unit Tests (push) Failing after 5s
Pipeline / API Lint (push) Failing after 3s
Pipeline / UI Tests (push) Successful in 1m30s
Pipeline / Build & Push API Image (push) Has been cancelled
Pipeline / Build & Push UI Image (push) Has been cancelled
Pipeline / API Integration Tests (push) Has been cancelled
Gitea Actions execs JavaScript actions (actions/checkout) inside the job container, unlike GitHub Actions which uses the host. The uv Python image has no Node.js, causing exit 127. Fix: drop container: from all three API jobs and run on the default ubuntu-latest environment. Integration tests: Postgres stays as a service container (no special startup command needed). MinIO moved to a manual docker run step using quay.io/minio/minio with `server /data` — the only way to pass a startup command. Bucket created via mc binary downloaded in-step. Service hostnames change from service-name to localhost now that there is no explicit job container. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -65,11 +65,12 @@ jobs:
|
|||||||
api-unit:
|
api-unit:
|
||||||
name: API Unit Tests
|
name: API Unit Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
|
||||||
image: ghcr.io/astral-sh/uv:python3.12-bookworm-slim
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install uv
|
||||||
|
run: pip install uv
|
||||||
|
|
||||||
- name: Cache uv store
|
- name: Cache uv store
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
@@ -99,20 +100,16 @@ jobs:
|
|||||||
api-lint:
|
api-lint:
|
||||||
name: API Lint
|
name: API Lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
|
||||||
image: ghcr.io/astral-sh/uv:python3.12-bookworm-slim
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Run Ruff
|
- name: Run Ruff
|
||||||
run: uvx ruff check .
|
run: pip install uv && uvx ruff check .
|
||||||
working-directory: api
|
working-directory: api
|
||||||
|
|
||||||
api-integration:
|
api-integration:
|
||||||
name: API Integration Tests
|
name: API Integration Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
|
||||||
image: ghcr.io/astral-sh/uv:python3.12-bookworm-slim
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:16
|
image: postgres:16
|
||||||
@@ -120,20 +117,34 @@ 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
|
||||||
--health-timeout 5s
|
--health-timeout 5s
|
||||||
--health-retries 10
|
--health-retries 10
|
||||||
minio:
|
|
||||||
image: bitnami/minio:latest
|
|
||||||
env:
|
|
||||||
MINIO_ROOT_USER: minioadmin
|
|
||||||
MINIO_ROOT_PASSWORD: minioadmin
|
|
||||||
MINIO_DEFAULT_BUCKETS: reactbin-test
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Start MinIO
|
||||||
|
run: |
|
||||||
|
docker run -d --name ci-minio \
|
||||||
|
-e MINIO_ROOT_USER=minioadmin \
|
||||||
|
-e MINIO_ROOT_PASSWORD=minioadmin \
|
||||||
|
-p 9000:9000 \
|
||||||
|
quay.io/minio/minio server /data
|
||||||
|
|
||||||
|
- name: Create MinIO bucket
|
||||||
|
run: |
|
||||||
|
curl -fsSL https://dl.min.io/client/mc/release/linux-amd64/mc -o /tmp/mc
|
||||||
|
chmod +x /tmp/mc
|
||||||
|
until /tmp/mc alias set local http://localhost:9000 minioadmin minioadmin; do sleep 2; done
|
||||||
|
/tmp/mc mb local/reactbin-test
|
||||||
|
|
||||||
|
- name: Install uv
|
||||||
|
run: pip install uv
|
||||||
|
|
||||||
- name: Cache uv store
|
- name: Cache uv store
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
@@ -149,9 +160,9 @@ 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@postgres/reactbin_test
|
TEST_DATABASE_URL: postgresql+asyncpg://reactbin:reactbin@localhost/reactbin_test
|
||||||
DATABASE_URL: postgresql+asyncpg://reactbin:reactbin@postgres/reactbin_test
|
DATABASE_URL: postgresql+asyncpg://reactbin:reactbin@localhost/reactbin_test
|
||||||
S3_ENDPOINT_URL: http://minio: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
|
||||||
S3_SECRET_ACCESS_KEY: minioadmin
|
S3_SECRET_ACCESS_KEY: minioadmin
|
||||||
@@ -161,6 +172,10 @@ jobs:
|
|||||||
OWNER_USERNAME: testowner
|
OWNER_USERNAME: testowner
|
||||||
OWNER_PASSWORD: testpass
|
OWNER_PASSWORD: testpass
|
||||||
|
|
||||||
|
- name: Stop MinIO
|
||||||
|
if: always()
|
||||||
|
run: docker stop ci-minio && docker rm ci-minio || true
|
||||||
|
|
||||||
# ── Image builds (tag-only, gated on all jobs) ────────────────────────────────
|
# ── Image builds (tag-only, gated on all jobs) ────────────────────────────────
|
||||||
|
|
||||||
build-api:
|
build-api:
|
||||||
|
|||||||
Reference in New Issue
Block a user