Test pygnunetrest using docker and gitlab CI

master
juga 2 years ago
parent b77874ce27
commit 4cea94f1fa

@ -30,3 +30,17 @@ build:
- setup.py
- tests
test-docker:
script:
- apk add --no-cache py-pip gcc libffi-dev openssl-dev libc-dev make python3-dev
- pip install docker-compose
- docker-compose up -d
- sleep 3
# XXX: when there is an official gnunet image that works, replace this
# See https://bugs.gnunet.org/view.php?id=6628
- docker pull registry.gitlab.com/juga0/gnunet:latest
- docker pull $RELEASE_IMAGE || true
- mkdir -p tmp
- cp docker/gnunet.conf tmp/
- docker-compose up -d
- docker exec gnunetrest pytest-3 tests

@ -0,0 +1,29 @@
version: "3"
services:
gnunet:
build:
context: .
image: registry.gitlab.com/juga0/gnunet:latest
container_name: gnunet
# Copy a gnunet.conf that enable REST in all interfaces into ./tmp
volumes:
- ./tmp:/home/gnunet/.config
# expose REST port to gnunetrest container
expose:
- 7776
restart: unless-stopped
gnunetrest:
build:
context: .
image: ${RELEASE_IMAGE:-gnunet-docker}
environment:
- HOST=gnunet
command: pytest-3 tests
container_name: gnunetrest
volumes:
- .:/home/gnunet/pygnunetrest
restart: unless-stopped
depends_on:
- gnunet

@ -0,0 +1,7 @@
[rest]
BIND_TO = 0.0.0.0
BIND_TO6 = ::
# IMMEDIATE_START = YES
# HTTP_PORT = 7771
# RUN_PER_USER = YES
Loading…
Cancel
Save