Skip to content

fix(frontend): resolve ESLint errors in CI pipeline#24

Merged
tassosgomes merged 5 commits intomainfrom
fix/esteira-front
Oct 6, 2025
Merged

fix(frontend): resolve ESLint errors in CI pipeline#24
tassosgomes merged 5 commits intomainfrom
fix/esteira-front

Conversation

@tassosgomes
Copy link
Copy Markdown
Owner

  • Extract useFormField hook to separate file to fix react-refresh/only-export-components
  • Replace any types with proper TypeScript interfaces in stack pages
  • Add proper type definitions for StackFormData interface
  • Ensure form.tsx only exports React components

Fixes 5 ESLint errors:

  • react-refresh/only-export-components in form.tsx
  • @typescript-eslint/no-explicit-any in create-stack.tsx (2 errors)
  • @typescript-eslint/no-explicit-any in edit-stack.tsx (2 errors)

- Extract useFormField hook to separate file to fix react-refresh/only-export-components
- Replace any types with proper TypeScript interfaces in stack pages
- Add proper type definitions for StackFormData interface
- Ensure form.tsx only exports React components

Fixes 5 ESLint errors:
- react-refresh/only-export-components in form.tsx
- @typescript-eslint/no-explicit-any in create-stack.tsx (2 errors)
- @typescript-eslint/no-explicit-any in edit-stack.tsx (2 errors)
- Add exclude pattern for e2e folder in vitest config
- Prevents Playwright test files from being executed by vitest
- Resolves test:unit command failure in CI pipeline

This ensures unit tests and e2e tests run in their proper environments:
- vitest for unit tests (src/test/* and src/**/*.test.*)
- playwright for e2e tests (e2e/*)
- Fix baseURL for CI environment (use port 4173 for preview)
- Increase workers from 1 to 2 for faster parallel execution
- Run only Chromium browser on CI (reduces from 78 to 26 tests)
- Disable webServer on CI (reuse existing preview server)
- Add appropriate timeouts for CI environment

This should significantly reduce E2E test execution time from 5+ minutes
to under 2 minutes while maintaining test coverage quality.
- Add frontend build and test artifacts to .gitignore
- Include playwright-report/, test-results/, coverage/ folders
- Add environment files (.env.local, etc.)
- Remove playwright-report/index.html from tracking

This prevents generated files from being committed accidentally.
Enhanced GitHub Actions workflow with detailed diagnostics:

🔍 Backend monitoring:
- Verbose API startup logging with health checks
- 60-second startup timeout with progress reporting
- Process and port monitoring
- Detailed error logging when API fails to start

🌐 Frontend monitoring:
- Enhanced preview server startup logging
- 30-second timeout with status checks
- Network connectivity verification
- Build output validation

🎭 Playwright test monitoring:
- Pre-test system diagnostics (memory, disk, processes)
- Service availability verification before test execution
- 10-minute test timeout to prevent infinite hangs
- Detailed failure diagnostics with log collection

🐘 PostgreSQL verification:
- Connection readiness checks before backend startup
- Database query validation

📊 Artifact collection:
- Upload logs (API + frontend) on any failure
- Upload test results and reports
- 7-day retention for debugging

⏱️ Timeouts:
- Job-level timeout: 20 minutes
- Individual step timeouts to prevent hangs

This should help identify exactly where E2E tests are getting stuck.
@tassosgomes tassosgomes merged commit e7c7c97 into main Oct 6, 2025
@tassosgomes tassosgomes deleted the fix/esteira-front branch October 6, 2025 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant