11version : 2.1
22
3+ parameters :
4+ poetry_version :
5+ type : string
6+ default : " 1.1.4"
7+
38workflows :
49 lint :
510 jobs :
@@ -14,6 +19,9 @@ workflows:
1419 # Run only when a tag is created
1520 tags :
1621 only : /^v.+\..+\..+/
22+ tests :
23+ jobs :
24+ - test_installation
1725
1826
1927jobs :
2331 steps :
2432 - checkout
2533 - run : " curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py
26- | python3 - --version 1.1.0 "
34+ | python3 - --version << pipeline.parameters.poetry_version >> "
2735 - run : poetry install --no-root
2836 - run : poetry run isort --check .
2937 - run : poetry run black --check .
3745 steps :
3846 - checkout
3947 - run : " curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py
40- | python3 - --version 1.1.0 "
48+ | python3 - --version << pipeline.parameters.poetry_version >> "
4149 - run : poetry build
4250 - run : POETRY_HTTP_BASIC_PYPI_PASSWORD=${PYPI_PASSWORD} poetry publish
51+ test_installation :
52+ machine :
53+ image : ubuntu-2004:202010-01
54+ steps :
55+ - run : sudo apt-get update
56+ - run : sudo apt-get install python3 python3-dev curl git -y
57+ - checkout
58+ - run : " curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py
59+ | python3 - --version << pipeline.parameters.poetry_version >>"
60+ - run : echo "export PATH=$PATH:$HOME/.poetry/bin" >> $BASH_ENV
61+ - run : sudo $(which poetry) install
62+ - run : sudo $(which poetry) run brainframe install --noninteractive
63+ - run : sudo $(which poetry) run brainframe compose up -d
64+ - run :
65+ name : Check BrainFrame containers are running
66+ command : |
67+ until docker container inspect -f {{.State.Running}} $(docker ps -q -f name="brainframe_core") >/dev/null 2>/dev/null; do
68+ sleep 0.1;
69+ done;
70+ echo "BrainFrame core container is running."
71+ no_output_timeout : 1m
72+ - run :
73+ name : Check BrainFrame core service is up
74+ command : |
75+ until curl -f http://localhost/api/version >/dev/null 2>/dev/null; do
76+ sleep 0.1;
77+ done;
78+ echo "BrainFrame core service is up."
79+ no_output_timeout : 1m
80+ - run : sudo $(which poetry) run brainframe compose down
0 commit comments