/
aaronair
/
Test_task_rt_solution
Обзор
Документация
Войти
/
aaronair
/
Test_task_rt_solution
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
.github/workflows/ci.yml
82 строки
2 KB
Ilikedrinkpivo
first_commit
28 май 2026, 14:51
28 май 2026, 14:51
b4498fc
Код
Авторство
О чём код?
name: CI on: push: branches: [main, master] pull_request: jobs: frontend: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: "22" cache: npm - run: npm ci - run: npm run typecheck - run: npm run build env: VITE_API_BASE_URL: /api/v1 backend: runs-on: ubuntu-latest services: postgres: image: postgres:16-alpine env: POSTGRES_DB: ai_portal POSTGRES_USER: user POSTGRES_PASSWORD: pass ports: - 5432:5432 options: >- --health-cmd "pg_isready -U user -d ai_portal" --health-interval 5s --health-timeout 5s --health-retries 5 minio: image: minio/minio env: MINIO_ROOT_USER: minioadmin MINIO_ROOT_PASSWORD: minioadmin ports: - 9000:9000 options: >- --health-cmd "curl -f http://localhost:9000/minio/health/live || exit 1" --health-interval 5s --health-timeout 5s --health-retries 5 --entrypoint sh minio/minio -c "mkdir -p /data && minio server /data" env: DATABASE_URL: postgresql://user:pass@localhost:5432/ai_portal S3_ENDPOINT: http://127.0.0.1:9000 S3_ACCESS_KEY: minioadmin S3_SECRET_KEY: minioadmin S3_BUCKET: ai-portal-documents-ci RUN_MIGRATIONS: "1" SEED_IF_EMPTY: "0" steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: "22" cache: npm cache-dependency-path: backend/package-lock.json - working-directory: backend run: npm ci - working-directory: backend run: npm run typecheck - working-directory: backend run: npm test docker: runs-on: ubuntu-latest needs: [frontend, backend] steps: - uses: actions/checkout@v4 - name: Build frontend image run: docker build -f Dockerfile.prod -t ai-portal-frontend:ci --build-arg VITE_API_BASE_URL=/api/v1 . - name: Build backend image run: docker build -t ai-portal-backend:ci ./backend