Poetry ci

Use the following script for setting up Poetry in a CI environment:

# Echo command line and fail on any error
set -e
set -x

wget --quiet -O /tmp/get-poetry.py https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py
pip3 install --upgrade pip
yes | python3 /tmp/get-poetry.py --version 1.0.2
poetry env use python3
~/.poetry/bin/poetry install
ln -s $(~/.poetry/bin/poetry env info --path) .venv

For each step that invokes Python, wrap it with ~/.poetry/bin/poetry run.