stages: - code-check - tests - benchmark image: "0xacab.org:4567/leap/gitlab-buildpackage:soledad" # Cache a folder between builds. # Tox sets it to be our pip cache. cache: untracked: true key: soledad-shared-pip-cache paths: - testing/.cache/ before_script: - echo "Running on ${HOST_HOSTNAME:=$(hostname)}" code-check: stage: code-check script: - cd testing - tox -e code-check tests: stage: tests services: - couchdb script: - cd testing - tox -- --couch-url http://couchdb:5984 benchmark: stage: benchmark tags: - benchmark services: - couchdb allow_failure: true script: - cd testing - curl -s couchdb:5984 # You can provide a $NETRC variable containing the creds for your # elasticsearch instance so it's protected from being leaked in the # CI console # We can't get it working inside docker for unknown reasons. #- echo "$NETRC" > /root/.netrc && chmod 600 /root/.netrc # # Add $PYTEST_OPTS to pytest.ini to allow posting benchmark tests # to an elasticsearch instance - echo "addopts=$PYTEST_OPTS" >> pytest.ini && chmod 600 pytest.ini - /usr/bin/unbuffer tox --recreate -e benchmark -- --couch-url http://couchdb:5984 -m 'not synchronous' | /usr/bin/ts -s