ci: добавил ci для фронта

This commit is contained in:
2026-05-14 02:46:24 +03:00
parent fbec0cc08a
commit e9d232fc22
2 changed files with 63 additions and 0 deletions
+63
View File
@@ -0,0 +1,63 @@
name: Frontend CI
on:
push:
branches: [ "main", "dev" ]
paths:
- 'frontend/**'
pull_request:
branches: [ "main", "dev" ]
paths:
- 'frontend/**'
jobs:
build-and-check:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
run_install: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: pnpm
cache-dependency-path: frontend/pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Audit dependencies
if: always()
run: pnpm audit --audit-level moderate
- name: Check formatting
if: always()
run: pnpm exec prettier --check src/
- name: Lint with oxlint
if: always()
run: pnpm exec oxlint .
- name: Lint with ESLint
if: always()
run: pnpm exec eslint . --max-warnings=0
- name: Type check
if: always()
run: pnpm run type-check
- name: Build
if: always()
run: pnpm run build-only