diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 666c9c8..0a8c4cb 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -16,6 +16,9 @@ jobs: echo "Code already available in workspace" pwd ls -la + echo "Checking for backend and frontend directories:" + ls -la backend/ 2>/dev/null || echo "backend directory not found" + ls -la frontend/ 2>/dev/null || echo "frontend directory not found" - name: Check Node.js version run: | @@ -26,8 +29,13 @@ jobs: - name: Install backend dependencies run: | - cd backend - npm ci + if [ -d "backend" ]; then + cd backend + npm ci + else + echo "Backend directory not found, skipping backend dependencies" + exit 1 + fi - name: Run backend tests env: @@ -35,23 +43,43 @@ jobs: JWT_SECRET: test-secret-key-for-ci NODE_ENV: test run: | - cd backend - npm run test + if [ -d "backend" ]; then + cd backend + npm run test + else + echo "Backend directory not found, skipping backend tests" + exit 1 + fi - name: Install frontend dependencies run: | - cd frontend - npm ci + if [ -d "frontend" ]; then + cd frontend + npm ci + else + echo "Frontend directory not found, skipping frontend dependencies" + exit 1 + fi - name: Run frontend tests run: | - cd frontend - npm run test + if [ -d "frontend" ]; then + cd frontend + npm run test + else + echo "Frontend directory not found, skipping frontend tests" + exit 1 + fi - name: Build frontend run: | - cd frontend - npm run build + if [ -d "frontend" ]; then + cd frontend + npm run build + else + echo "Frontend directory not found, skipping frontend build" + exit 1 + fi deploy: needs: test diff --git a/.gitignore b/.gitignore index 6e83934..e7b4067 100644 --- a/.gitignore +++ b/.gitignore @@ -62,4 +62,7 @@ temp/ # Local development files (not for public repo) *.local CODE_STRUCTURE.local -RESTART_SUMMARY.md \ No newline at end of file +RESTART_SUMMARY.md + +# Ignore GitHub workflows when pushing to Gitea +.github/ \ No newline at end of file