It’s definitely debatable if I’m doing the appropriate configuration.
I started with a testing scheme locally using docker-compose. Where the service under-development is tested by bringing up only the supporting services, and running the key service tests with the key service communicating with the docker-compose raised supporting services.
As I understand, I can spin up the whole docker-compose full service using the docker executor. But with the way my project is structured I need to run tests outside and communicate with the docker-compose network.
Anyway, your suggestion, is more what I expected and was looking for. However, when I run the config below I get the error:
ERROR:
#!/bin/bash -eo pipefail pyenv global 3.7.0
pyenv: version `3.7.0' not installed
So as mentioned initially, I did try to install python 3.7.0 through pyenv, but the build process fails with the following error:
Updating /opt/circleci/.pyenv/plugins/pyenv-update...
From git://github.com/pyenv/pyenv-update
* branch master -> FETCH_HEAD
Already up-to-date.
Downloading Python-3.7.0.tar.xz...
-> https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
Installing Python-3.7.0...
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
Please consult to the Wiki page to fix the problem.
https://github.com/pyenv/pyenv/wiki/Common-build-problems
BUILD FAILED (Ubuntu 14.04 using python-build 1.1.5-198-g835707da)
Inspect or clean up the working tree at /tmp/python-build.20181023003037.4964
Results logged to /tmp/python-build.20181023003037.4964.log
Last 10 log lines:
install|*) ensurepip="" ;; \
esac; \
./python -E -m ensurepip \
$ensurepip --root=/ ; \
fi
Looking in links: /tmp/tmpucqugnjm
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-10.0.1 setuptools-39.0.1
Exited with code 1
So my apologies. What I provided before only worked because I was using a different VM. The best solution I can find is to use an updated machine image. The one in the example below already has Python 3.7.0: