Skip to content

Conversation

@shawnSpy
Copy link

What I Did

Implemented a GitHub Actions CI/CD pipeline that automatically runs quality checks on every pull request and push to main. The workflow includes four parallel jobs: backend linting (PHP_CodeSniffer and PHPStan), backend tests (PHPUnit), frontend linting (ESLint), and frontend E2E tests (Playwright).

Depends On

None - this PR is independent and builds from main.

How to Test

  1. Push this branch to your fork
  2. Open a pull request from ci/github-actions to main
  3. Navigate to the "Actions" tab in your GitHub repository
  4. Verify that the workflow runs automatically and all checks pass (green status)

Architectural Decision Record (ADR)

I chose to structure the workflow with four separate jobs that run in parallel for better performance and clearer separation of concerns. Each job uses Docker Compose to maintain consistency with the local development environment. The backend test job starts the database and backend services, seeds the database, and runs tests. The frontend test job starts all services (db, backend, frontend), waits for them to be healthy, seeds the database, and runs Playwright E2E tests. Cleanup steps ensure containers and volumes are removed even if tests fail.

AI Usage Summary

Used AI assistance to structure the GitHub Actions workflow, handle Docker Compose integration, and implement proper service health checks and cleanup procedures.

- Run backend linting (PHP_CodeSniffer and PHPStan)
- Run backend tests (PHPUnit)
- Run frontend linting (ESLint)
- Run frontend E2E tests (Playwright)
- Trigger on PRs to any branch and pushes to main
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