Merge pull request #753 from miurla/security/nextjs-16.0.10-v2 #504
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, v1.0.0] | |
| pull_request: | |
| branches: [main, v1.0.0] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| name: Lint | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.2.12 | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Run linting | |
| run: bun lint | |
| typecheck: | |
| runs-on: ubuntu-latest | |
| name: Type Check | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.2.12 | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Run type checking | |
| run: bun typecheck | |
| format: | |
| runs-on: ubuntu-latest | |
| name: Format Check | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.2.12 | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Check formatting | |
| run: bun format:check | |
| test: | |
| runs-on: ubuntu-latest | |
| name: Test | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.2.12 | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Run tests | |
| run: | | |
| if [ -f "vitest.config.ts" ] || [ -f "vitest.config.mts" ]; then | |
| bun run test | |
| fi | |
| env: | |
| DATABASE_URL: postgresql://user:pass@localhost:5432/db | |
| NODE_ENV: test | |
| build: | |
| runs-on: ubuntu-latest | |
| name: Build | |
| needs: [lint, typecheck, format, test] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.2.12 | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Build application | |
| run: bun run build | |
| env: | |
| DATABASE_URL: postgresql://user:pass@localhost:5432/db |