refactor: from clean-elysia and clean-hono #7
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 Pipeline" | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - dev | |
| # push: | |
| # branches: | |
| # - main | |
| # - dev | |
| jobs: | |
| lint-build: | |
| name: "Lint and Build" | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:18-alpine | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: clean_fastify_test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis:8-alpine | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - name: "Checkout Repository" | |
| uses: actions/checkout@v4 | |
| - name: "Setup Bun" | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: "Install Dependencies" | |
| run: bun install --frozen-lockfile | |
| - name: "Run Database Migrations" | |
| run: bunx --bun drizzle-kit push | |
| env: | |
| DATABASE_URL: postgresql://postgres:postgres@localhost:5432/clean_fastify_test | |
| - name: "Run Database Seeders" | |
| run: bun run ./src/libs/database/seed/index.ts | |
| env: | |
| DATABASE_URL: postgresql://postgres:postgres@localhost:5432/clean_fastify_test | |
| - name: "Run Lint" | |
| run: bun run lint | |
| - name: "Run Build" | |
| run: bun run build | |
| - name: "Verify Build Output" | |
| run: | | |
| ls -lh dist/ | |
| test -f dist/src/serve.js || exit 1 | |
| test -f dist/src/bull/index.js || exit 1 |