Switch CI to use poetry
This commit is contained in:
parent
4c70562687
commit
faa08f3aef
1 changed files with 9 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue