fix: CI修复 — 删除middleware.ts(Next.js 16改用proxy.ts) + 移除子包无依赖的lint脚本 #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/CD Pipeline | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| DATABASE_URL: postgresql://postgres:postgrespassword@localhost:5432/timemap | |
| MEILISEARCH_URL: http://127.0.0.1:7700 | |
| MEILISEARCH_API_KEY: timemap-master-key | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgis/postgis:15-3.3 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgrespassword | |
| POSTGRES_DB: timemap | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| meilisearch: | |
| image: getmeili/meilisearch:v1.7 | |
| env: | |
| MEILI_MASTER_KEY: timemap-master-key | |
| MEILI_NO_ANALYTICS: true | |
| options: >- | |
| --health-cmd "curl -f http://localhost:7700/health" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 7700:7700 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run lint | |
| run: pnpm run lint | |
| - name: Check types | |
| run: pnpm run check-types | |
| - name: Build | |
| run: pnpm run build |