chore: add missing project infrastructure (CI, templates, .gitignore) #1
Workflow file for this run
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: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint: | |
| name: Lint & Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.27.0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "pnpm" | |
| cache-dependency-path: server/pnpm-lock.yaml | |
| - run: cd server && pnpm install --frozen-lockfile | |
| - run: cd server && pnpm format-and-lint | |
| typecheck: | |
| name: Type Check | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.27.0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "pnpm" | |
| cache-dependency-path: server/pnpm-lock.yaml | |
| - run: cd server && pnpm install --frozen-lockfile | |
| - run: cd server/packages/database && pnpm prisma generate | |
| - run: cd server && pnpm build | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: opengui | |
| POSTGRES_PASSWORD: opengui | |
| POSTGRES_DB: opengui | |
| 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: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.27.0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "pnpm" | |
| cache-dependency-path: server/pnpm-lock.yaml | |
| - run: cd server && pnpm install --frozen-lockfile | |
| - run: cd server/packages/database && pnpm prisma generate | |
| - run: cd server/apps/backend && pnpm test | |
| env: | |
| DATABASE_URL: postgresql://opengui:opengui@localhost:5432/opengui | |
| REDIS_HOST: localhost | |
| REDIS_PORT: 6379 | |