Loading .gitlab-ci.yml +14 −15 Original line number Diff line number Diff line default: cache: paths: - .cache/pip - .venv/ stages: - quality - test Loading @@ -11,32 +5,37 @@ stages: variables: PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" VENV_DIR: "$CI_PROJECT_DIR/.venv" .setup_python: cache: paths: - .cache/pip .python_job: image: python:3.12-slim before_script: - python3 --version - python3 -m venv "$VENV_DIR" - . "$VENV_DIR/bin/activate" - python --version - python -m pip install --upgrade pip - python -m pip install -e ".[dev,postgres]" quality: stage: quality extends: .setup_python extends: .python_job script: - . "$VENV_DIR/bin/activate" - pre-commit run --all-files test: stage: test extends: .setup_python extends: .python_job script: - . "$VENV_DIR/bin/activate" - pytest || [ $? -eq 5 ] build: stage: build image: docker:29.3.0 services: - docker:29.3.0-dind variables: DOCKER_TLS_CERTDIR: "" script: - docker build -t oeg-ci-test . rules: Loading Loading
.gitlab-ci.yml +14 −15 Original line number Diff line number Diff line default: cache: paths: - .cache/pip - .venv/ stages: - quality - test Loading @@ -11,32 +5,37 @@ stages: variables: PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" VENV_DIR: "$CI_PROJECT_DIR/.venv" .setup_python: cache: paths: - .cache/pip .python_job: image: python:3.12-slim before_script: - python3 --version - python3 -m venv "$VENV_DIR" - . "$VENV_DIR/bin/activate" - python --version - python -m pip install --upgrade pip - python -m pip install -e ".[dev,postgres]" quality: stage: quality extends: .setup_python extends: .python_job script: - . "$VENV_DIR/bin/activate" - pre-commit run --all-files test: stage: test extends: .setup_python extends: .python_job script: - . "$VENV_DIR/bin/activate" - pytest || [ $? -eq 5 ] build: stage: build image: docker:29.3.0 services: - docker:29.3.0-dind variables: DOCKER_TLS_CERTDIR: "" script: - docker build -t oeg-ci-test . rules: Loading