Skip to content

Commit 99fb461

Browse files
author
Anze
committed
Try different approach for running redis during tests
1 parent 8f909b6 commit 99fb461

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.gitlab-ci.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,16 @@ stages:
1313
pytest:
1414
stage: test
1515
image: python:3.6-slim-stretch
16+
services:
17+
- redis:5-alpine
1618
before_script:
1719
- apt-get update
1820
- apt-get install --no-install-recommends -q -y libsnmp-dev build-essential git
1921
- pip install --no-cache-dir pipenv
2022
- pipenv install --dev
21-
- docker run -d --net=host -p 127.0.0.1:6379:6379 --name redis redis:5-alpine
2223
script:
23-
- export REDIS_HOST="127.0.0.1"
24+
- export REDIS_HOST="redis"
2425
- pipenv run pytest -x test_snmpcollector.py
25-
after_script:
26-
- docker rm -f redis
2726

2827
deploy to docker hub:
2928
stage: deploy

0 commit comments

Comments
 (0)