Skip to content

fix(frontend): fix duplicated path segments in workspace file viewer #1525

fix(frontend): fix duplicated path segments in workspace file viewer

fix(frontend): fix duplicated path segments in workspace file viewer #1525

Workflow file for this run

name: E2E Tests
# Runs automatically on PRs. Uses mock SDK (no real API key needed).
on:
pull_request:
branches: [ main, master ]
push:
branches: [ main ]
concurrency:
group: e2e-tests-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
detect-changes:
# Only run for same-repo PRs (not forks) and pushes to main.
# Fork PRs build and execute untrusted code in the CI runner environment.
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push'
runs-on: ubuntu-latest
outputs:
frontend: ${{ steps.filter.outputs.frontend }}
backend: ${{ steps.filter.outputs.backend }}
operator: ${{ steps.filter.outputs.operator }}
claude-runner: ${{ steps.filter.outputs.claude-runner }}
steps:
- name: Checkout PR code
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Check for component changes
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
frontend:
- 'components/frontend/**'
backend:
- 'components/backend/**'
operator:
- 'components/operator/**'
claude-runner:
- 'components/runners/**'
e2e:
name: End-to-End Tests
runs-on: ubuntu-latest
needs: [detect-changes]
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push'
timeout-minutes: 25
steps:
- name: Checkout PR code
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Cleanup Diskspace
uses: kubeflow/pipelines/.github/actions/github-disk-cleanup@master
if: (!cancelled())
- name: Validate AGENTS.md symlink
run: |
echo "Validating AGENTS.md → CLAUDE.md symlink..."
[ -L AGENTS.md ] || (echo "❌ AGENTS.md is not a symlink" && exit 1)
[ "$(readlink AGENTS.md)" = "CLAUDE.md" ] || (echo "❌ AGENTS.md points to wrong target" && exit 1)
[ -f CLAUDE.md ] || (echo "❌ CLAUDE.md does not exist" && exit 1)
diff -q AGENTS.md CLAUDE.md > /dev/null || (echo "❌ AGENTS.md content differs from CLAUDE.md" && exit 1)
echo "✅ AGENTS.md symlink is valid"
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: e2e/package-lock.json
- name: Install Cypress dependencies
working-directory: e2e
run: npm ci
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- name: Build component images from PR code
run: |
echo "======================================"
echo "Building images from PR code..."
echo "PR #${{ github.event.pull_request.number }}"
echo "SHA: ${{ github.event.pull_request.head.sha }}"
echo "======================================"
# Build frontend image (if changed or use latest)
if [ "${{ needs.detect-changes.outputs.frontend }}" == "true" ]; then
echo "Building frontend (changed)..."
docker build -t quay.io/ambient_code/vteam_frontend:e2e-test \
-f components/frontend/Dockerfile \
components/frontend
else
echo "Frontend unchanged, pulling latest..."
docker pull quay.io/ambient_code/vteam_frontend:latest
docker tag quay.io/ambient_code/vteam_frontend:latest quay.io/ambient_code/vteam_frontend:e2e-test
fi
# Build backend image (if changed or use latest)
if [ "${{ needs.detect-changes.outputs.backend }}" == "true" ]; then
echo "Building backend (changed)..."
docker build -t quay.io/ambient_code/vteam_backend:e2e-test \
-f components/backend/Dockerfile \
components/backend
else
echo "Backend unchanged, pulling latest..."
docker pull quay.io/ambient_code/vteam_backend:latest
docker tag quay.io/ambient_code/vteam_backend:latest quay.io/ambient_code/vteam_backend:e2e-test
fi
# Build operator image (if changed or use latest)
if [ "${{ needs.detect-changes.outputs.operator }}" == "true" ]; then
echo "Building operator (changed)..."
docker build -t quay.io/ambient_code/vteam_operator:e2e-test \
-f components/operator/Dockerfile \
components/operator
else
echo "Operator unchanged, pulling latest..."
docker pull quay.io/ambient_code/vteam_operator:latest
docker tag quay.io/ambient_code/vteam_operator:latest quay.io/ambient_code/vteam_operator:e2e-test
fi
# Build ambient-runner image (if changed or use latest)
if [ "${{ needs.detect-changes.outputs.claude-runner }}" == "true" ]; then
echo "Building ambient-runner (changed)..."
docker build -t quay.io/ambient_code/vteam_claude_runner:e2e-test \
-f components/runners/ambient-runner/Dockerfile \
components/runners
else
echo "Claude-runner unchanged, pulling latest..."
docker pull quay.io/ambient_code/vteam_claude_runner:latest
docker tag quay.io/ambient_code/vteam_claude_runner:latest quay.io/ambient_code/vteam_claude_runner:e2e-test
fi
echo ""
echo "✅ All images ready"
docker images | grep e2e-test
- name: Install kind
run: |
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.27.0/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
kind version
- name: Setup kind cluster
working-directory: e2e
run: |
chmod +x scripts/*.sh
./scripts/setup-kind.sh
- name: Load images into kind cluster
run: |
echo "======================================"
echo "Loading images into kind cluster..."
echo "======================================"
kind load docker-image quay.io/ambient_code/vteam_frontend:e2e-test --name ambient-local
kind load docker-image quay.io/ambient_code/vteam_backend:e2e-test --name ambient-local
kind load docker-image quay.io/ambient_code/vteam_operator:e2e-test --name ambient-local
kind load docker-image quay.io/ambient_code/vteam_claude_runner:e2e-test --name ambient-local
echo "✅ All images loaded into kind cluster"
- name: Deploy vTeam (mock SDK mode)
working-directory: e2e
env:
IMAGE_FRONTEND: quay.io/ambient_code/vteam_frontend:e2e-test
IMAGE_BACKEND: quay.io/ambient_code/vteam_backend:e2e-test
IMAGE_OPERATOR: quay.io/ambient_code/vteam_operator:e2e-test
IMAGE_RUNNER: quay.io/ambient_code/vteam_claude_runner:e2e-test
run: ./scripts/deploy.sh
- name: Verify deployment
run: |
echo "Checking pods..."
kubectl get pods -n ambient-code
echo ""
echo "Checking services..."
kubectl get svc -n ambient-code
- name: Run Cypress E2E tests
working-directory: e2e
run: ./scripts/run-tests.sh
- name: Upload test results
if: failure()
uses: actions/upload-artifact@v6
with:
name: cypress-screenshots-pr-${{ github.event.pull_request.number }}
path: e2e/cypress/screenshots
if-no-files-found: ignore
retention-days: 7
- name: Upload test videos
if: failure()
uses: actions/upload-artifact@v6
with:
name: cypress-videos-pr-${{ github.event.pull_request.number }}
path: e2e/cypress/videos
if-no-files-found: ignore
retention-days: 7
- name: Debug logs on failure
if: failure()
run: |
echo "=== Frontend logs ==="
kubectl logs -n ambient-code -l app=frontend --tail=100 || true
echo ""
echo "=== Backend logs ==="
kubectl logs -n ambient-code -l app=backend-api --tail=100 || true
echo ""
echo "=== Operator logs ==="
kubectl logs -n ambient-code -l app=agentic-operator --tail=100 || true
- name: Cleanup
if: always()
working-directory: e2e
run: |
CLEANUP_ARTIFACTS=true ./scripts/cleanup.sh || true