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
+33
View File
@@ -0,0 +1,33 @@
name: Backend CI
on:
push:
branches: [ "main", "dev" ]
paths:
- 'backend/**'
pull_request:
branches: [ "main", "dev" ]
paths:
- 'backend/**'
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Restore dependencies
run: dotnet restore backend/UniVerse.sln
- name: Build
run: dotnet build backend/UniVerse.sln --no-restore --configuration Release
- name: Test
run: dotnet test backend/UniVerse.sln --no-build --configuration Release --verbosity normal
+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