Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,13 @@ jobs:
git config --global init.defaultBranch main
- name: Build and start services with Docker Compose
run: docker compose up -d --build
run: docker compose up -d --build --wait || true

- name: Wait for services to be ready
- name: Debug service state
if: always()
run: |
timeout 60 bash -c '
while [ "$(docker compose ps | grep -c "Up")" -ne 3 ]; do
sleep 2
done
' || { echo "Service readiness check failed:"; docker compose ps; exit 1; }
docker compose ps
docker compose logs
- name: Run E2E tests
run: npm run test:e2e
Expand Down
404 changes: 365 additions & 39 deletions CONTRIBUTING.md

Large diffs are not rendered by default.

28 changes: 26 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ services:
# If using Podman, you might need to add the :Z or :z option for SELinux
# - ./test-e2e.proxy.config.json:/app/test-e2e.proxy.config.json:ro,Z
depends_on:
- mongodb
- git-server
mongodb:
condition: service_healthy
git-server:
condition: service_healthy
networks:
- git-network
environment:
Expand All @@ -30,6 +32,12 @@ services:
# - Comma-separated list = 'http://localhost:3000,https://example.com'
# - Unset/empty = Same-origin only (most secure)
- ALLOWED_ORIGINS=
healthcheck:
test: ['CMD-SHELL', 'curl -sf http://localhost:8081/api/v1/healthcheck || exit 1']
interval: 5s
timeout: 5s
retries: 12
start_period: 10s
mongodb:
image: mongo:7@sha256:606f8e029603330411a7dd10b5ffd50eefc297fc80cee89f10a455e496a76ae7
ports:
Expand All @@ -40,6 +48,12 @@ services:
- MONGO_INITDB_DATABASE=gitproxy
volumes:
- mongodb_data:/data/db
healthcheck:
test: ['CMD', 'mongosh', '--eval', "db.adminCommand('ping')"]
interval: 5s
timeout: 5s
retries: 12
start_period: 5s

git-server:
build: localgit/
Expand All @@ -50,6 +64,16 @@ services:
networks:
- git-network
hostname: git-server
healthcheck:
test:
[
'CMD-SHELL',
'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',
]
interval: 5s
timeout: 5s
retries: 12
start_period: 5s

networks:
git-network:
Expand Down
Loading
Loading