fixup! Merge remote-tracking branch 'devbox-origin/happy' into feat-m… #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: ['**'] | |
| pull_request: | |
| branches: ['**'] | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:17 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: handy | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis:7 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - name: Checkout repository with submodules | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| cache: 'yarn' | |
| cache-dependency-path: | | |
| cli/yarn.lock | |
| server/yarn.lock | |
| expo-app/yarn.lock | |
| - name: Install yarn | |
| run: npm install -g yarn | |
| - name: Install MinIO server and client | |
| run: | | |
| wget -q https://dl.min.io/server/minio/release/linux-amd64/minio | |
| chmod +x minio | |
| sudo mv minio /usr/local/bin/ | |
| wget -q https://dl.min.io/client/mc/release/linux-amd64/mc | |
| chmod +x mc | |
| sudo mv mc /usr/local/bin/ | |
| - name: Install Playwright dependencies | |
| run: | | |
| npm install -g playwright | |
| npx playwright install chromium | |
| npx playwright install-deps chromium | |
| - name: Install cli dependencies | |
| working-directory: cli | |
| run: yarn install --frozen-lockfile | |
| - name: Install server dependencies | |
| working-directory: server | |
| run: yarn install --frozen-lockfile | |
| # Note: Slot-specific databases (handy_test_N) are created automatically | |
| # by happy-launcher.sh when starting services for that slot. | |
| # We pre-run migrations here to ensure the schema is ready and to catch | |
| # any migration errors early in the CI pipeline. | |
| - name: Setup server database (Prisma migrations) | |
| working-directory: server | |
| run: yarn migrate | |
| env: | |
| DATABASE_URL: postgresql://postgres:postgres@localhost:5432/handy | |
| - name: Install expo-app dependencies | |
| working-directory: expo-app | |
| run: yarn install --frozen-lockfile | |
| - name: Install E2E test dependencies | |
| working-directory: scripts/e2e | |
| run: npm install | |
| # Run the validation script | |
| # Uses slot 1 for E2E tests to isolate from any other processes | |
| # Automatically cleans up all processes on exit | |
| - name: Run validation (full - builds, unit tests, and E2E) | |
| run: ./scripts/validate.sh | |
| env: | |
| CI: true | |
| # These are used by happy-launcher.sh to detect existing services | |
| POSTGRES_PORT: 5432 | |
| REDIS_PORT: 6379 |