diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..4cf9f04f15c297c7025dd3d57e3d9b1960553768 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,42 @@ +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