exp360test/.gitlab-ci.yml
Kumi 46b1ad0278
Add GitLab CI configuration for Python environment
Introduced a CI pipeline configuration for the project that sets up a Python environment with version 3.11, installs necessary dependencies, and runs initial project setup steps. This includes performing database migrations and starting a test server to verify deployment readiness by making a health check request. The pipeline defines two stages: 'prepare' for the environment setup and 'test' for validating the operational status of the app. It ensures that all commits pushed to the repository maintain a consistent quality and functionality before merging.
2024-02-04 09:06:28 +01:00

21 lines
316 B
YAML

image: python:3.11
stages:
- prepare
- test
prepare:
stage: prepare
script:
- python -V
- pip install -r requirements.txt
test:
stage: test
script:
- python manage.py migrate --noinput
- python manage.py runserver 0.0.0.0:8000 &
- sleep 5
- curl --fail http://localhost:8000/