Skip to content

Instantly share code, notes, and snippets.

@iktakahiro
Created February 8, 2020 10:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iktakahiro/d038abb2b4ef8bf0b36c17389fc3995d to your computer and use it in GitHub Desktop.
Save iktakahiro/d038abb2b4ef8bf0b36c17389fc3995d to your computer and use it in GitHub Desktop.
[WIP] Use Poetry on GitLab CI
image: python:3.7
before_script:
- curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
- export PATH="$PATH:$HOME/.poetry/bin/"
- source $HOME/.poetry/env
- poetry install
- source `poetry env info --path`/bin/activate
build:
stage: build
script:
- echo 123
test:
stage: test
script:
- echo 123
@dimitrismistriotis
Copy link

Maybe add test -e $HOME/.poetry/bin/ || in front of curl

Making it:
``


This way if you cache poetry:

cache:
paths:
- /.poetry/bin/


you will not have to download every time and your GitlabCI will run on the rare days when githubusercontent.com is down.

@dimitrismistriotis
Copy link

2 years after lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment