Skip to content

feature: inhancing workflows security and codeowners permissions #90

feature: inhancing workflows security and codeowners permissions

feature: inhancing workflows security and codeowners permissions #90

Workflow file for this run

name: CI
on:
push:
branches: [develop]
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-typecheck:
name: Lint & Typecheck
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Node 20
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20
- name: Setup pnpm 10
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
with:
version: 10
- name: Cache pnpm store
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Generate Prisma client (v7 — reads prisma.config.ts)
working-directory: apps/server
run: npx prisma generate
- name: Typecheck (shared -> server -> desktop -> admin)
run: pnpm typecheck
- name: Lint
run: pnpm lint
- name: Security audit (dependencies)
run: pnpm audit --audit-level=high
continue-on-error: true
- name: Unit tests
run: pnpm test
env:
JWT_SECRET: ci-test-secret
JWT_REFRESH_SECRET: ci-test-refresh-secret
security:
name: Security Scan
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: Gitleaks (secrets detection)
uses: gitleaks/gitleaks-action@ff98106d4c7b40b7eb5303a239c8a7386bc95e4c # v2.3.9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_ENABLE_UPLOAD_ARTIFACT: false
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Node 20
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20
- name: Setup pnpm 10
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
with:
version: 10
- name: Cache pnpm store
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Generate Prisma client (v7 — reads prisma.config.ts)
working-directory: apps/server
run: npx prisma generate
- name: Build shared
run: pnpm build:shared
- name: Build server
run: pnpm build:server
- name: Build desktop
run: pnpm build:desktop
- name: Build admin
run: pnpm build:admin