From faa08f3aefe71f1c3f6ece39d73e0e2ab58d9e92 Mon Sep 17 00:00:00 2001 From: Richard Bowman Date: Mon, 29 Mar 2021 11:26:38 +0100 Subject: [PATCH] Switch CI to use poetry --- .gitlab-ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c737ad8b..64e74db9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,12 +6,12 @@ stages: - deploy # Re-usable block to install (and cache) Poetry and openflexure-microscope-server -.poetry-install-template: &poetry-install +.python-install-template: &python-install before_script: - - curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - - source $HOME/.poetry/env - - poetry config virtualenvs.in-project true - - poetry install -vv + - python3 -m venv .venv # NB this does not overwrite an existing cached venv + - source .venv/bin/activate + - pip install pipenv # Should be cached after first run + - pipenv install # Should be cached after first run - will just check packages are present cache: key: "${CI_COMMIT_REF_SLUG}" paths: @@ -34,7 +34,7 @@ pylint: image: python:3.7 retry: 1 - <<: *poetry-install + <<: *python-install script: - poetry run poe pylint @@ -51,7 +51,7 @@ mypy: image: python:3.7 retry: 1 - <<: *poetry-install + <<: *python-install script: - poetry run poe mypy @@ -73,7 +73,7 @@ black: retry: 1 allow_failure: true - <<: *poetry-install + <<: *python-install script: # Run static build script @@ -91,7 +91,7 @@ pytest: image: python:3.7 retry: 1 - <<: *poetry-install + <<: *python-install script: - poetry run poe test