-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
47 lines (41 loc) · 1003 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
stages:
- test
test:
stage: test
image:
name: $LINBIT_DOCKER_REGISTRY/drbd-reactor-e2e:latest
entrypoint: [""]
rules:
- if: $CI_MERGE_REQUEST_ID
cache:
paths:
- .cache/pip
- venv/
services:
- name: chrboe/sshd:v0.1.1
alias: sshd
variables:
FF_NETWORK_PER_BUILD: 1
AUTHORIZED_KEYS: $CI_SSH_PUBLIC_KEY
before_script:
- python3 -V
- pip3 install virtualenv
- virtualenv venv
- source venv/bin/activate
- |
set -x
mkdir -p ~/.ssh
echo "$CI_SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
chmod 0600 ~/.ssh/id_ed25519
ssh-keyscan sshd > ~/.ssh/known_hosts
script:
- pip install pytest pytest-xdist pytest-cov
- coverage run -m pytest -v -n 10 src/lbpytest/ --host sshd
- coverage report
- coverage xml
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml