Skip to content

Commit 0666146

Browse files
coopernetesclaude
andcommitted
docs: restructure contributing docs and improve E2E test infrastructure
Move developer resources (setup, building, testing, code quality) into CONTRIBUTING.md and refocus the website's contributing page on project governance (roles, voting, CLA). Slim down localgit/README.md to a summary now that CONTRIBUTING.md covers E2E setup in detail. Rename E2E test repositories from real project names to clearly fake names (test-owner/test-repo, e2e-org/sample-repo). Add fail-fast pre-flight checks in E2E setup to detect missing Docker infrastructure. Add Docker Hub login to CI workflow to avoid pull rate limits. Remove outdated Mocha/Chai testing page from docs site and fix plugin import paths. Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent 6fb63d0 commit 0666146

File tree

13 files changed

+586
-1318
lines changed

13 files changed

+586
-1318
lines changed

.github/workflows/e2e.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,13 @@ jobs:
4141
git config --global init.defaultBranch main
4242
4343
- name: Build and start services with Docker Compose
44-
run: docker compose up -d --build
44+
run: docker compose up -d --build --wait || true
4545

46-
- name: Wait for services to be ready
46+
- name: Debug service state
47+
if: always()
4748
run: |
48-
timeout 60 bash -c '
49-
while [ "$(docker compose ps | grep -c "Up")" -ne 3 ]; do
50-
sleep 2
51-
done
52-
' || { echo "Service readiness check failed:"; docker compose ps; exit 1; }
49+
docker compose ps
50+
docker compose logs
5351
5452
- name: Run E2E tests
5553
run: npm run test:e2e

CONTRIBUTING.md

Lines changed: 365 additions & 39 deletions
Large diffs are not rendered by default.

docker-compose.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ services:
1010
# If using Podman, you might need to add the :Z or :z option for SELinux
1111
# - ./test-e2e.proxy.config.json:/app/test-e2e.proxy.config.json:ro,Z
1212
depends_on:
13-
- mongodb
14-
- git-server
13+
mongodb:
14+
condition: service_healthy
15+
git-server:
16+
condition: service_healthy
1517
networks:
1618
- git-network
1719
environment:
@@ -30,6 +32,12 @@ services:
3032
# - Comma-separated list = 'http://localhost:3000,https://example.com'
3133
# - Unset/empty = Same-origin only (most secure)
3234
- ALLOWED_ORIGINS=
35+
healthcheck:
36+
test: ['CMD-SHELL', 'curl -sf http://localhost:8081/api/v1/healthcheck || exit 1']
37+
interval: 5s
38+
timeout: 5s
39+
retries: 12
40+
start_period: 10s
3341
mongodb:
3442
image: mongo:7@sha256:606f8e029603330411a7dd10b5ffd50eefc297fc80cee89f10a455e496a76ae7
3543
ports:
@@ -40,6 +48,12 @@ services:
4048
- MONGO_INITDB_DATABASE=gitproxy
4149
volumes:
4250
- mongodb_data:/data/db
51+
healthcheck:
52+
test: ['CMD', 'mongosh', '--eval', "db.adminCommand('ping')"]
53+
interval: 5s
54+
timeout: 5s
55+
retries: 12
56+
start_period: 5s
4357

4458
git-server:
4559
build: localgit/
@@ -50,6 +64,16 @@ services:
5064
networks:
5165
- git-network
5266
hostname: git-server
67+
healthcheck:
68+
test:
69+
[
70+
'CMD-SHELL',
71+
'GIT_TERMINAL_PROMPT=0 GIT_SSL_NO_VERIFY=1 git ls-remote https://admin:admin123@localhost:8443/test-owner/test-repo.git HEAD || exit 1',
72+
]
73+
interval: 5s
74+
timeout: 5s
75+
retries: 12
76+
start_period: 5s
5377

5478
networks:
5579
git-network:

0 commit comments

Comments
 (0)