Skip to content
Snippets Groups Projects
Commit 71227620 authored by duyanhehe's avatar duyanhehe
Browse files

add gitlab ci cd

parent 06a35553
No related merge requests found
Pipeline #8850 failed
stages:
- install
- test
- deploy
variables:
VENV_DIR: .venv
PIP_CACHE_DIR: $CI_PROJECT_DIR/.pip_cache
cache:
paths:
- $PIP_CACHE_DIR
before_script:
- python -m venv $VENV_DIR
- source $VENV_DIR/Scripts/activate
- pip install --upgrade pip
- pip install -r requirements.txt --cache-dir $PIP_CACHE_DIR
install_dependencies:
stage: install
script:
- echo "Dependencies installed successfully."
run_tests:
stage: test
script:
- pytest --maxfail=5 --disable-warnings
artifacts:
when: always
paths:
- tests/reports/
reports:
junit: tests/reports/junit.xml
deploy:
stage: deploy
script:
- echo "Deploying application..."
- python run_app.py
only:
- main
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment