2018-05-18 20:41:41 +02:00
|
|
|
language: python
|
2018-05-20 22:05:50 +02:00
|
|
|
sudo: required
|
2018-05-18 20:41:41 +02:00
|
|
|
python:
|
2019-02-24 21:34:09 +01:00
|
|
|
- '3.7'
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- python: 3.7
|
|
|
|
dist: xenial
|
|
|
|
sudo: true
|
2018-05-20 22:05:50 +02:00
|
|
|
services:
|
|
|
|
- docker
|
2018-05-18 20:41:41 +02:00
|
|
|
install:
|
2018-07-05 01:20:13 +02:00
|
|
|
- sudo apt-get install -y curl python-tk
|
2018-05-20 22:40:14 +02:00
|
|
|
- sudo pip install -U pip
|
2018-05-20 22:05:50 +02:00
|
|
|
- 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
|
2018-05-20 22:34:56 +02:00
|
|
|
- pip install -r dev-requirements.txt
|
2019-04-05 11:35:48 +02:00
|
|
|
- git clone https://github.com/tsileo/poussetaches.git && cd poussetaches && docker build . -t poussetaches:latest && cd -
|
2018-05-18 20:41:41 +02:00
|
|
|
script:
|
2018-05-20 22:11:32 +02:00
|
|
|
- mypy --ignore-missing-imports .
|
2018-05-21 11:21:11 +02:00
|
|
|
- flake8 activitypub.py
|
2018-05-21 12:18:15 +02:00
|
|
|
- cp -r tests/fixtures/me.yml config/me.yml
|
2018-06-01 20:29:44 +02:00
|
|
|
- docker build . -t microblogpub:latest
|
2018-05-20 22:11:32 +02:00
|
|
|
- docker-compose up -d
|
|
|
|
- docker-compose ps
|
2019-04-05 20:06:18 +02:00
|
|
|
- WEB_PORT=5006 COMPOSE_PROJECT_NAME=instance1 CONFIG_DIR=./tests/fixtures/instance1/config docker-compose -p instance1 -f docker-compose-tests.yml up -d
|
2018-05-21 13:03:44 +02:00
|
|
|
- docker-compose -p instance1 -f docker-compose-tests.yml ps
|
2019-04-05 20:06:18 +02:00
|
|
|
- WEB_PORT=5007 COMPOSE_PROJECT_NAME=instance2 CONFIG_DIR=./tests/fixtures/instance2/config docker-compose -p instance2 -f docker-compose-tests.yml up -d
|
2018-05-21 13:03:44 +02:00
|
|
|
- docker-compose -p instance2 -f docker-compose-tests.yml ps
|
2018-09-01 12:54:39 +02:00
|
|
|
- sleep 5
|
2018-05-26 09:50:59 +02:00
|
|
|
# Integration tests first
|
2018-05-27 11:50:09 +02:00
|
|
|
- python -m pytest -v --ignore data -k integration
|
2018-05-26 09:50:59 +02:00
|
|
|
# Federation tests (with two local instances)
|
2018-05-27 11:50:09 +02:00
|
|
|
- python -m pytest -v -s --ignore data -k federation
|