Commit db31d96c authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

Heptapod CI: using pytest-shard

Closes #14

As explained in issue comment, two shards seem to be a good,
useful, starting point.

--HG--
branch : stable
parent b45206289e6e
Pipeline #12081 passed with stages
in 36 minutes and 51 seconds
......@@ -11,7 +11,7 @@ flake8:
script:
- flake8 tests conftest.py
docker-remote:
.docker-remote:
stage: test-heptapod
services:
- name: octobus/heptapod:$TARGET_HEPTAPOD_IMAGE
......@@ -19,6 +19,8 @@ docker-remote:
- name: selenium/standalone-chrome
alias: selenium
image: octobus/ci-py3-hgext3rd
variables:
PYTEST_NUM_SHARDS: 2
script:
- apt-get update
- apt-get -y install tox openssh-client
......@@ -48,4 +50,17 @@ docker-inside:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- when: manual # default case
docker-remote-0:
variables:
PYTEST_SHARD_ID: 0
extends:
- .docker-remote
docker-remote-1:
variables:
PYTEST_SHARD_ID: 1
extends:
- .docker-remote
......@@ -4,6 +4,8 @@ set -e
HEPTAPOD_SERVICE_IP=`getent ahostsv4 heptapod | grep STREAM | cut -f 1 -d ' '`
COMMON_FLAGS="-v \
--num-shards=$PYTEST_NUM_SHARDS \
--shard-id=$PYTEST_SHARD_ID \
--heptapod-url http://$HEPTAPOD_SERVICE_IP \
--heptapod-ssh-port 22 \
--heptapod-remote \
......
......@@ -8,6 +8,7 @@ deps =
pytest
selenium
pytest-parallel
pytest-shard
commands =
py.test {posargs}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment