microblog.pub/.drone.yml

44 lines
1.9 KiB
YAML
Raw Normal View History

2019-04-11 15:35:52 -05:00
kind: pipeline
name: default
steps:
- name: build
image: python:3
volumes:
- name: dockersock
path: /var/run/docker.sock
commands:
- apt update -y
2019-04-11 15:40:35 -05:00
- apt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2 curl python-tk
2019-04-11 15:35:52 -05:00
- curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
- add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
- apt update -y
- apt install -y docker-ce
- pip install -U pip
- curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
- chmod +x /usr/local/bin/docker-compose
- docker-compose --version
- pip install -r dev-requirements.txt
- git clone https://github.com/tsileo/poussetaches.git && cd poussetaches && docker build . -t poussetaches:latest && cd -
- mypy --ignore-missing-imports .
- flake8 activitypub.py
- cp -r tests/fixtures/me.yml config/me.yml
- docker build . -t microblogpub:latest
2019-04-12 01:47:32 -05:00
- WEB_PORT=5006 COMPOSE_PROJECT_NAME=instance1 CONFIG_DIR="${pwd}/tests/fixtures/instance1/config" docker-compose -p instance1 -f docker-compose-tests.yml up -d
- COMPOSE_PROJECT_NAME=instance1 docker-compose -p instance1 -f docker-compose-tests.yml ps
2019-04-12 02:05:01 -05:00
- sleep 30
2019-04-12 01:47:32 -05:00
- WEB_PORT=5007 COMPOSE_PROJECT_NAME=instance2 CONFIG_DIR="${pwd}/tests/fixtures/instance2/config" docker-compose -p instance2 -f docker-compose-tests.yml up -d
- COMPOSE_PROJECT_NAME=instance2 docker-compose -p instance2 -f docker-compose-tests.yml ps
2019-04-11 16:32:23 -05:00
- sleep 30
2019-04-12 02:05:01 -05:00
- curl http://localhost:5006
- curl http://localhost:5007
2019-04-11 15:35:52 -05:00
# Integration tests first
2019-04-11 16:17:41 -05:00
# - python -m pytest -v --ignore data -k integration
2019-04-11 15:35:52 -05:00
# Federation tests (with two local instances)
- python -m pytest -v -s --ignore data -k federatio
2019-04-11 15:07:44 -05:00
2019-04-11 15:30:23 -05:00
volumes:
2019-04-11 15:32:46 -05:00
- name: dockersock
host:
path: /var/run/docker.sock