Commit 9471bc5c authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

Heptapod CI: merged pytest-shard from the stable branch.

Pipeline #11130 failed with stages
in 1 minute and 1 second
...@@ -11,7 +11,7 @@ flake8: ...@@ -11,7 +11,7 @@ flake8:
script: script:
- flake8 tests conftest.py - flake8 tests conftest.py
docker-remote: .docker-remote:
stage: test-heptapod stage: test-heptapod
services: services:
- name: octobus/heptapod:$TARGET_HEPTAPOD_IMAGE - name: octobus/heptapod:$TARGET_HEPTAPOD_IMAGE
...@@ -19,6 +19,8 @@ docker-remote: ...@@ -19,6 +19,8 @@ docker-remote:
- name: selenium/standalone-chrome - name: selenium/standalone-chrome
alias: selenium alias: selenium
image: octobus/ci-py3-hgext3rd image: octobus/ci-py3-hgext3rd
variables:
PYTEST_NUM_SHARDS: 2
script: script:
- apt-get update - apt-get update
- apt-get -y install tox openssh-client - apt-get -y install tox openssh-client
...@@ -51,4 +53,17 @@ docker-inside: ...@@ -51,4 +53,17 @@ docker-inside:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- when: manual # default case - 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 ...@@ -4,6 +4,8 @@ set -e
HEPTAPOD_SERVICE_IP=`getent ahostsv4 heptapod | grep STREAM | cut -f 1 -d ' '` HEPTAPOD_SERVICE_IP=`getent ahostsv4 heptapod | grep STREAM | cut -f 1 -d ' '`
COMMON_FLAGS="-v \ COMMON_FLAGS="-v \
--num-shards=$PYTEST_NUM_SHARDS \
--shard-id=$PYTEST_SHARD_ID \
--heptapod-url http://$HEPTAPOD_SERVICE_IP \ --heptapod-url http://$HEPTAPOD_SERVICE_IP \
--heptapod-ssh-port 22 \ --heptapod-ssh-port 22 \
--heptapod-remote \ --heptapod-remote \
......
...@@ -8,6 +8,7 @@ deps = ...@@ -8,6 +8,7 @@ deps =
pytest pytest
selenium selenium
pytest-parallel pytest-parallel
pytest-shard
commands = commands =
py.test {posargs} 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