Skip to content

Commit 5285e63

Browse files
author
Loboa
committed
fix: обновлены пути к проекту в CI/CD конфигурации для корректной сборки и тестирования
1 parent 8fcab59 commit 5285e63

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,20 @@ jobs:
4545
4646
# Шаг 4: Восстановить зависимости
4747
- name: 📦 Restore dependencies
48-
run: dotnet restore backend/src/GraphVisualizationApp/GraphVisualizationApp.csproj
48+
run: dotnet restore graph-visualization-app/backend/src/GraphVisualizationApp/GraphVisualizationApp.csproj
4949

5050
# Шаг 5: Собрать проект
5151
- name: 🔨 Build backend
52-
run: dotnet build backend/src/GraphVisualizationApp/GraphVisualizationApp.csproj --configuration Release --no-restore
52+
run: dotnet build graph-visualization-app/backend/src/GraphVisualizationApp/GraphVisualizationApp.csproj --configuration Release --no-restore
5353

5454
# Шаг 6: Запустить тесты (когда появятся)
5555
# TODO: Раскомментировать когда создадите тесты
5656
# - name: 🧪 Run tests
57-
# run: dotnet test backend/tests/ --configuration Release --no-build --verbosity normal
57+
# run: dotnet test graph-visualization-app/backend/tests/ --configuration Release --no-build --verbosity normal
5858

5959
# Шаг 7: Проверка формата кода (опционально)
6060
- name: 🎨 Check code format
61-
run: dotnet format backend/src/GraphVisualizationApp/GraphVisualizationApp.csproj --verify-no-changes --verbosity diagnostic
61+
run: dotnet format graph-visualization-app/backend/src/GraphVisualizationApp/GraphVisualizationApp.csproj --verify-no-changes --verbosity diagnostic
6262
continue-on-error: true # Не блокируем сборку, только предупреждаем
6363

6464
# ==========================================
@@ -79,31 +79,31 @@ jobs:
7979
with:
8080
node-version: ${{ env.NODE_VERSION }}
8181
cache: 'npm'
82-
cache-dependency-path: frontend/package-lock.json
82+
cache-dependency-path: graph-visualization-app/frontend/package-lock.json
8383

8484
# Шаг 3: Установить зависимости
8585
- name: 📦 Install dependencies
8686
run: |
87-
cd frontend
87+
cd graph-visualization-app/frontend
8888
npm ci
8989
9090
# Шаг 4: Проверка кода ESLint (если настроен)
9191
- name: 🎨 Lint code
9292
run: |
93-
cd frontend
93+
cd graph-visualization-app/frontend
9494
npm run lint || echo "⚠️ ESLint не настроен, пропускаем"
9595
continue-on-error: true
9696

9797
# Шаг 5: Проверка TypeScript
9898
- name: 🔍 TypeScript check
9999
run: |
100-
cd frontend
100+
cd graph-visualization-app/frontend
101101
npx tsc --noEmit
102102
103103
# Шаг 6: Собрать production bundle
104104
- name: 🔨 Build frontend
105105
run: |
106-
cd frontend
106+
cd graph-visualization-app/frontend
107107
npm run build
108108
env:
109109
NODE_OPTIONS: --openssl-legacy-provider
@@ -112,15 +112,15 @@ jobs:
112112
# TODO: Раскомментировать когда создадите тесты
113113
# - name: 🧪 Run tests
114114
# run: |
115-
# cd frontend
115+
# cd graph-visualization-app/frontend
116116
# npm test -- --coverage --watchAll=false
117117

118118
# Шаг 8: Сохранить build артефакты
119119
- name: 📤 Upload build artifacts
120120
uses: actions/upload-artifact@v4
121121
with:
122122
name: frontend-build
123-
path: frontend/dist
123+
path: graph-visualization-app/frontend/dist
124124
retention-days: 7
125125

126126
# ==========================================
@@ -137,7 +137,7 @@ jobs:
137137
# Backend: Проверка .NET зависимостей
138138
- name: 🔒 Scan .NET dependencies
139139
run: |
140-
dotnet list backend/src/GraphVisualizationApp/GraphVisualizationApp.csproj package --vulnerable --include-transitive 2>&1 | tee dotnet-vulnerabilities.txt
140+
dotnet list graph-visualization-app/backend/src/GraphVisualizationApp/GraphVisualizationApp.csproj package --vulnerable --include-transitive 2>&1 | tee dotnet-vulnerabilities.txt
141141
if grep -q "has the following vulnerable packages" dotnet-vulnerabilities.txt; then
142142
echo "⚠️ Найдены уязвимости в .NET зависимостях"
143143
exit 1
@@ -147,7 +147,7 @@ jobs:
147147
# Frontend: Проверка npm зависимостей
148148
- name: 🔒 Scan npm dependencies
149149
run: |
150-
cd frontend
150+
cd graph-visualization-app/frontend
151151
npm audit --audit-level=moderate || echo "⚠️ Найдены уязвимости в npm пакетах"
152152
continue-on-error: true
153153

@@ -181,8 +181,8 @@ jobs:
181181
- name: 🐳 Build backend image
182182
uses: docker/build-push-action@v5
183183
with:
184-
context: ./backend
185-
file: ./backend/Dockerfile
184+
context: ./graph-visualization-app/backend
185+
file: ./graph-visualization-app/backend/Dockerfile
186186
push: false # Пока только собираем, не пушим
187187
tags: |
188188
graph-visualization-backend:latest
@@ -194,8 +194,8 @@ jobs:
194194
- name: 🐳 Build frontend image
195195
uses: docker/build-push-action@v5
196196
with:
197-
context: ./frontend
198-
file: ./frontend/Dockerfile
197+
context: ./graph-visualization-app/frontend
198+
file: ./graph-visualization-app/frontend/Dockerfile
199199
push: false # Пока только собираем, не пушим
200200
tags: |
201201
graph-visualization-frontend:latest
@@ -206,6 +206,7 @@ jobs:
206206
# Тестовый запуск всего стека через docker-compose
207207
- name: 🧪 Test docker-compose
208208
run: |
209+
cd graph-visualization-app
209210
# Копируем пример env файла
210211
cp .env.example .env
211212
# Проверяем что docker-compose конфигурация валидна

0 commit comments

Comments
 (0)