55d3348085
Run Tests / Backend Tests (push) Has been cancelled
Run Tests / Frontend Tests (push) Has been cancelled
Run Tests / Test Summary (push) Has been cancelled
Deploy Dashboard (Dev) / deploy-dev (push) Failing after 15m27s
Deploy Claude Dev (Dev) / deploy-claude-dev-dev (push) Has started running
- Remove container blocks causing Docker-in-Docker permission issues - Use actions/checkout@v4 instead of manual git cloning - Use actions/setup-python@v5 and actions/setup-node@v4 for clean environments - Remove nsenter workarounds and mount complexity - Fix volume paths to use /volume1/docker/* directly - Add /volume1/docker/claude-dev to runner valid_volumes config This eliminates 20+ commits of permission/namespace hacks by letting workflows run directly in the runner's environment which already has Docker access and proper volume mounts configured.
89 lines
2.2 KiB
YAML
89 lines
2.2 KiB
YAML
name: Run Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [main, dev]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
backend-tests:
|
|
name: Backend Tests
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
SECRET_KEY: test-secret-key-for-ci-environment-32chars-minimum
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
cd dashboard/backend
|
|
python -m venv venv
|
|
. venv/bin/activate
|
|
pip install -r requirements.txt
|
|
pip install -r requirements-dev.txt
|
|
pip install pytest-timeout
|
|
|
|
- name: Run unit tests
|
|
run: |
|
|
cd dashboard/backend
|
|
. venv/bin/activate
|
|
pytest tests/unit/ -v --timeout=30 -x
|
|
echo "✅ Unit tests passed"
|
|
|
|
- name: Run integration tests
|
|
run: |
|
|
cd dashboard/backend
|
|
. venv/bin/activate
|
|
pytest tests/integration/ -v --timeout=30 -x
|
|
echo "✅ Integration tests passed"
|
|
|
|
frontend-tests:
|
|
name: Frontend Tests
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
cd dashboard/frontend
|
|
npm ci
|
|
|
|
- name: Run tests
|
|
run: |
|
|
cd dashboard/frontend
|
|
npm run test:coverage -- --reporter=verbose --run
|
|
echo "✅ Frontend tests passed"
|
|
|
|
test-summary:
|
|
name: Test Summary
|
|
runs-on: ubuntu-latest
|
|
needs: [backend-tests, frontend-tests]
|
|
if: always()
|
|
|
|
steps:
|
|
- name: Check job results
|
|
run: |
|
|
echo "Backend tests: ${{ needs.backend-tests.result }}"
|
|
echo "Frontend tests: ${{ needs.frontend-tests.result }}"
|
|
|
|
if [ "${{ needs.backend-tests.result }}" != "success" ] || [ "${{ needs.frontend-tests.result }}" != "success" ]; then
|
|
echo "❌ Some tests failed"
|
|
exit 1
|
|
fi
|
|
echo "✅ All tests passed"
|