Skip to content

Tensorflow layer error detection #120

Tensorflow layer error detection

Tensorflow layer error detection #120

Workflow file for this run

name: Web Stack CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install backend deps
run: |
python -m pip install --upgrade pip
pip install -r backend/requirements.txt
- name: Test backend
env:
PYTHONPATH: .
run: pytest -q backend/tests --cov=backend --cov-report=xml --cov-fail-under=75
- name: Bandit security scan
run: bandit -r backend -x backend/tests -q
frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install
working-directory: frontend
run: |
npm ci || npm install
- name: Test
working-directory: frontend
run: npm test -- --coverage --passWithNoTests
- name: E2E placeholder
working-directory: frontend
run: npm run test:e2e
- name: Build
working-directory: frontend
run: npm run build
integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Compose build
run: |
docker compose version || true
docker compose build || docker-compose build
- name: Compose up
run: docker compose up -d || docker-compose up -d
- name: Wait for backend
run: |
ATTEMPTS=60
echo "Waiting for backend to become healthy..."
until curl -sf http://localhost:8000/api/health; do
ATTEMPTS=$((ATTEMPTS-1))
if [ $ATTEMPTS -le 0 ]; then
echo "Backend did not become healthy after 3 minutes"
echo "=== Docker compose status ==="
docker compose ps || docker-compose ps || true
echo "=== Backend logs ==="
docker compose logs edgeflow-api || docker-compose logs edgeflow-api || true
echo "=== Network connectivity test ==="
docker compose exec -T edgeflow-api curl -v http://localhost:8000/api/health || true
exit 1
fi
echo "Waiting... ($ATTEMPTS attempts remaining)"
sleep 3
done
echo "Backend is healthy!"
- name: Smoke API
run: |
curl -sf http://localhost:8000/api/version
- name: Compose down
if: always()
run: docker compose down -v || docker-compose down -v