Added poetry to script environment

This commit is contained in:
Joel Collins 2020-11-23 10:46:53 +00:00
parent f5012cddec
commit 3814e7d1a5

View file

@ -8,8 +8,9 @@ stages:
.poetry-install-template: &poetry-install .poetry-install-template: &poetry-install
before_script: before_script:
- curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
- $HOME/.poetry/bin/poetry config virtualenvs.in-project true - source $HOME/.poetry/env
- $HOME/.poetry/bin/poetry install -vv - poetry config virtualenvs.in-project true
- poetry install -vv
cache: cache:
key: "${CI_COMMIT_REF_SLUG}" key: "${CI_COMMIT_REF_SLUG}"
paths: paths:
@ -34,7 +35,7 @@ pylint:
<<: *poetry-install <<: *poetry-install
script: script:
- $HOME/.poetry/bin/poetry run pylint ./openflexure_microscope/ - poetry run pylint ./openflexure_microscope/
only: only:
- branches - branches
@ -51,7 +52,7 @@ black:
script: script:
# Run static build script # Run static build script
- $HOME/.poetry/bin/poetry run black --check . - poetry run black --check .
only: only:
- branches - branches
@ -119,7 +120,6 @@ package:
- "./dist/openflexure-microscope-server-${CI_COMMIT_REF_NAME}.tar.gz.sha256" - "./dist/openflexure-microscope-server-${CI_COMMIT_REF_NAME}.tar.gz.sha256"
only: only:
- merge_requests
- tags - tags
- web - web