1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00
Files
AdministrationItDepartmens/.gitlab-ci.yml
MoonTestUse1 e14f118f35 Fix database
2025-01-07 06:58:25 +06:00

45 lines
771 B
YAML

image: python:3.11
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.pip-cache"
PYTHONPATH: "$CI_PROJECT_DIR/backend"
cache:
paths:
- .pip-cache/
- venv/
- frontend/node_modules/
stages:
- test
test-backend:
stage: test
before_script:
- python -V
- python -m venv venv
- source venv/bin/activate
- cd backend
- pip install -r requirements.txt
script:
- python -m pytest -v tests/test_health.py
rules:
- if: $CI_COMMIT_BRANCH
exists:
- backend/**/*
test-frontend:
stage: test
image: node:18
cache:
paths:
- frontend/node_modules/
before_script:
- cd frontend
- npm install
script:
- npm run test
rules:
- if: $CI_COMMIT_BRANCH
exists:
- frontend/**/*