refactor(shared): enhance Result type documentation and structure #29
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: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16-alpine | |
| env: | |
| POSTGRES_USER: test | |
| POSTGRES_PASSWORD: test | |
| POSTGRES_DB: test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis:7-alpine | |
| 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: 9.15.0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build packages | |
| run: pnpm build:packages | |
| - name: Lint | |
| run: pnpm lint | |
| - name: Type check | |
| run: pnpm typecheck | |
| - name: Run migrations | |
| run: pnpm --filter @repo/db db:push:ci | |
| env: | |
| DATABASE_URL: postgres://test:test@localhost:5432/test | |
| - name: Test | |
| run: pnpm test | |
| env: | |
| NODE_ENV: test | |
| DATABASE_URL: postgres://test:test@localhost:5432/test | |
| REDIS_URL: redis://localhost:6379 | |
| BETTER_AUTH_SECRET: test-secret-for-ci-at-least-32-chars | |
| BETTER_AUTH_URL: http://localhost:9999 | |
| SERVER_URL: http://localhost:9999 | |
| FRONTEND_URL: http://localhost:5173 |