Implement feature X to enhance user experience and optimize performance #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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| typecheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Cache Turbo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| .turbo | |
| node_modules/.cache/turbo | |
| key: turbo-${{ runner.os }}-${{ github.ref_name }}-${{ github.sha }} | |
| restore-keys: | | |
| turbo-${{ runner.os }}-${{ github.ref_name }}- | |
| turbo-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile=false | |
| - name: Prisma Generate | |
| run: pnpm --filter backend prisma:generate | |
| - name: Typecheck | |
| run: pnpm lint | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile=false | |
| - name: Lint | |
| run: pnpm lint | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile=false | |
| - name: Run Unit Tests | |
| run: pnpm test | |
| - name: Backend Coverage | |
| run: pnpm --filter backend test -- --coverage | |
| - name: Upload Coverage Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage | |
| path: | | |
| apps/backend/coverage | |
| apps/mobile/coverage | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: [typecheck, lint, test] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile=false | |
| - name: Prisma Generate | |
| run: pnpm --filter backend prisma:generate | |
| - name: Build backend | |
| run: pnpm --filter backend build | |
| - name: Build mobile | |
| run: pnpm --filter mobile build | |
| - name: Build web | |
| run: pnpm --filter web build | |
| security-audit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile=false | |
| - name: Security audit | |
| run: pnpm audit --prod | |
| e2e: | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile=false | |
| - name: Install Playwright Browsers | |
| run: pnpm exec playwright install --with-deps chromium | |
| - name: Run E2E tests | |
| env: | |
| RUN_E2E: 'false' | |
| run: pnpm e2e |