docs(changelog): document CRLF/LF line ending fix decision #9
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, main, develop] | |
| pull_request: | |
| branches: [master, main] | |
| env: | |
| NODE_VERSION: '22' | |
| jobs: | |
| # ─── Lint ────────────────────────────────────────────────────────────────── | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: apps/api | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'npm' | |
| cache-dependency-path: apps/api/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run ESLint | |
| run: npx eslint "{src,apps,libs,test}/**/*.ts" --max-warnings 0 | |
| # ─── Test ────────────────────────────────────────────────────────────────── | |
| test: | |
| name: Unit & Integration Tests | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| services: | |
| postgres: | |
| image: postgres:16-alpine | |
| env: | |
| POSTGRES_USER: flowforge | |
| POSTGRES_PASSWORD: flowforge | |
| POSTGRES_DB: flowforge_test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| mongodb: | |
| image: mongo:7-jammy | |
| ports: | |
| - 27017:27017 | |
| options: >- | |
| --health-cmd "mongosh --eval \"db.adminCommand('ping')\"" | |
| --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 3 | |
| defaults: | |
| run: | |
| working-directory: apps/api | |
| env: | |
| DATABASE_URL: postgresql://flowforge:flowforge@localhost:5432/flowforge_test | |
| MONGODB_URI: mongodb://localhost:27017/flowforge_test | |
| REDIS_URL: redis://localhost:6379 | |
| JWT_ACCESS_SECRET: ci-access-secret | |
| JWT_REFRESH_SECRET: ci-refresh-secret | |
| JWT_ACCESS_EXPIRES_IN: 15m | |
| JWT_REFRESH_EXPIRES_IN: 7d | |
| NODE_ENV: test | |
| DISABLE_WORKER: 'true' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'npm' | |
| cache-dependency-path: apps/api/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run Prisma migrations | |
| run: npx prisma migrate deploy | |
| - name: Run unit tests | |
| run: npm run test | |
| - name: Run E2E tests | |
| run: npm run test:e2e | |
| # ─── Build ───────────────────────────────────────────────────────────────── | |
| build: | |
| name: TypeScript Build | |
| runs-on: ubuntu-latest | |
| needs: test | |
| defaults: | |
| run: | |
| working-directory: apps/api | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'npm' | |
| cache-dependency-path: apps/api/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build TypeScript | |
| run: npm run build | |
| # ─── Docker Build & Push ─────────────────────────────────────────────────── | |
| docker-build-push: | |
| name: Docker Build & Push | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push API image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: ./apps/api | |
| file: ./apps/api/Dockerfile | |
| push: true | |
| tags: | | |
| ghcr.io/${{ github.repository }}/api:latest | |
| ghcr.io/${{ github.repository }}/api:${{ github.sha }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |