Skip to content

update packages to public publishConfig #11

update packages to public publishConfig

update packages to public publishConfig #11

name: Dashboard E2E Tests
on:
push:
branches: [main]
paths:
- "apps/ops-dashboard/**"
- ".github/workflows/test-e2e-dashboard.yml"
pull_request:
branches: [main]
paths:
- "apps/ops-dashboard/**"
- ".github/workflows/test-e2e-dashboard.yml"
workflow_dispatch:
inputs:
test_type:
description: 'Type of tests to run'
required: true
default: 'all'
type: choice
options:
- all
- workflow
- component
- accessibility
jobs:
e2e-tests:
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup kubectl
uses: azure/setup-kubectl@v3
with:
version: v1.31.3
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 10.12.2
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build dashboard
run: |
cd apps/ops-dashboard
pnpm build
- name: Install Playwright browsers
run: |
cd apps/ops-dashboard
npx playwright install --with-deps
- name: Setup Kind cluster
run: |
kind create cluster --name dashboard-e2e-${{ github.run_id }}
kubectl cluster-info
kubectl get nodes -o wide
kubectl get namespaces
- name: Start kubectl proxy
run: |
kubectl proxy --port=8001 --accept-hosts='^.*$' --address='0.0.0.0' &
echo "PROXY_PID=$!" >> $GITHUB_ENV
sleep 5
curl -f http://127.0.0.1:8001/api || (echo 'proxy failed' && exit 1)
- name: Run all E2E tests
run: |
cd apps/ops-dashboard
pnpm run test:e2e || true # Ignore failures for now
env:
K8S_API: http://127.0.0.1:8001
NODE_ENV: test
CI: true
- name: Log kubectl
if: always()
run: |
kubectl get all -A
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: apps/ops-dashboard/test-results/
retention-days: 7
- name: Upload screenshots on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: screenshots
path: apps/ops-dashboard/test-results/screenshots/
retention-days: 7
- name: Cleanup Kind cluster
if: always()
run: |
kind delete cluster --name dashboard-e2e-${{ github.run_id }}