66 lines
1.3 KiB
YAML
66 lines
1.3 KiB
YAML
name: CI/CD Pipeline
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
branches: [main, develop]
|
|
|
|
jobs:
|
|
lint-and-test:
|
|
name: Lint, Test & Build
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v1
|
|
with:
|
|
bun-version: latest
|
|
|
|
- name: Install dependencies
|
|
run: bun install --frozen-lockfile
|
|
|
|
- name: Run TypeScript type check
|
|
run: bun run type-check
|
|
|
|
- name: Run ESLint
|
|
run: bun run lint
|
|
|
|
- name: Check Prettier formatting
|
|
run: bun run format:check
|
|
|
|
- name: Run tests
|
|
run: bun run test:ci
|
|
|
|
- name: Build application
|
|
run: bun run build
|
|
|
|
- name: Upload build artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: build-files
|
|
path: .next/
|
|
|
|
security-audit:
|
|
name: Security Audit
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v1
|
|
with:
|
|
bun-version: latest
|
|
|
|
- name: Install dependencies
|
|
run: bun install --frozen-lockfile
|
|
|
|
- name: Run security audit
|
|
run: bun audit
|
|
|
|
- name: Run dependency check
|
|
run: bunx audit-ci --moderate
|