From b2372217a1d6f40b64f2afbb734571ae14c0e27c Mon Sep 17 00:00:00 2001 From: varac Date: Wed, 5 Apr 2017 12:47:40 +0200 Subject: [test] Run test in docker --- .gitlab-ci.yml | 3 +++ benchmark-all-commits.sh | 17 ++++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9387f843..4ab6a25d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -68,6 +68,9 @@ benchmark: - couchdb allow_failure: true script: + # We need some files on order to post the right benchmarking data to elasticsearch + - git checkout origin/master testing/tox.ini testing/tests/benchmarks/conftest.py testing/tests/conftest.py + - git status - cd testing - curl -s couchdb:5984 # You can provide a $NETRC variable containing the creds for your diff --git a/benchmark-all-commits.sh b/benchmark-all-commits.sh index 418ed905..d368eff0 100755 --- a/benchmark-all-commits.sh +++ b/benchmark-all-commits.sh @@ -18,17 +18,20 @@ while /bin/true do echo -e '\n\n\n\n\n' - git checkout origin/master testing/tox.ini testing/tests/benchmarks/conftest.py testing/tests/conftest.py - curl -s localhost:5984 || exit 1 + # Option 1: Run couchdb + tox localy - dirty! + # curl -s localhost:5984 || exit 1 # Make sure we kill all leftover soledad server/pytest procs - pkill -f -9 tox - tox -c testing/tox.ini -e benchmark -- -x "$PYTEST_OPTS" - #gitlab-runner exec docker benchmark --env PYTEST_OPTS="$PYTEST_OPTS" + #pkill -f -9 tox + #git checkout origin/master testing/tox.ini testing/tests/benchmarks/conftest.py testing/tests/conftest.py + #tox -c testing/tox.ini -e benchmark -- -x "$PYTEST_OPTS" + #git reset HEAD testing/tox.ini + #git checkout testing/tox.ini testing/tests/benchmarks/conftest.py testing/tests/conftest.py + # Option 2: Run couchdb + tox in docker container using gitlab-runner + git checkout origin/benchmark-all-commits .gitlab-ci.yml + gitlab-runner exec docker benchmark --env PYTEST_OPTS="$PYTEST_OPTS" --env HOST_HOSTNAME="$(hostname)" - git reset HEAD testing/tox.ini - git checkout testing/tox.ini testing/tests/benchmarks/conftest.py testing/tests/conftest.py git checkout HEAD^ done -- cgit v1.2.3