Skip to content

Fix React Server Components RCE vulnerability #253

Fix React Server Components RCE vulnerability

Fix React Server Components RCE vulnerability #253

Workflow file for this run

name: CI
on:
push:
branches: [main, develop, feature/*]
pull_request:
branches: [main, develop]
jobs:
# フロントエンドのテスト・ビルド・Lint
frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.12.3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run type check
run: pnpm exec tsc --noEmit
- name: Run tests
run: pnpm test -- --coverage
- name: Build
run: pnpm build
env:
NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL || 'http://localhost:8787' }}
- name: Upload coverage
uses: codecov/codecov-action@v4
if: success()
with:
directory: ./frontend/coverage
flags: frontend
fail_ci_if_error: false
# バックエンドのチェック
backend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.12.3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Generate Prisma Client
run: pnpm prisma:generate
- name: Type check
run: pnpm exec tsc --noEmit
# バックエンドのテストがあれば実行
- name: Run tests
run: pnpm test --if-present
if: ${{ contains(hashFiles('backend/package.json'), 'test') }}
# Prismaスキーマの検証
prisma:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.12.3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Validate Prisma schema
run: pnpm exec prisma validate --schema=../prisma/schema.prisma
env:
DATABASE_URL: "postgresql://user:password@localhost:5432/dummy"
- name: Check Prisma format
run: pnpm exec prisma format --check --schema=../prisma/schema.prisma