microblog.pub/.travis.yml
Thomas Sileo bd0eaf5252 Fix CI
2018-09-01 12:54:39 +02:00

31 lines
1.2 KiB
YAML

language: python
sudo: required
python:
- "3.6"
services:
- docker
install:
- sudo apt-get install -y curl python-tk
- sudo pip install -U pip
- sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
- docker-compose --version
- pip install -r dev-requirements.txt
script:
- mypy --ignore-missing-imports .
- flake8 activitypub.py
- cp -r tests/fixtures/me.yml config/me.yml
- docker build . -t microblogpub:latest
- docker-compose up -d
- docker-compose ps
- WEB_PORT=5006 CONFIG_DIR=./tests/fixtures/instance1/config docker-compose -p instance1 -f docker-compose-tests.yml up -d
- docker-compose -p instance1 -f docker-compose-tests.yml ps
- WEB_PORT=5007 CONFIG_DIR=./tests/fixtures/instance2/config docker-compose -p instance2 -f docker-compose-tests.yml up -d
- docker-compose -p instance2 -f docker-compose-tests.yml ps
- sleep 5
- curl http://localhost:5006
- curl http://localhost:5007
# Integration tests first
- python -m pytest -v --ignore data -k integration
# Federation tests (with two local instances)
- python -m pytest -v -s --ignore data -k federation