Fix drone file

This commit is contained in:
Thomas Sileo 2019-04-11 22:35:52 +02:00
parent 090e68fa8b
commit 98b16f0da4

View file

@ -1,38 +1,41 @@
pipeline: kind: pipeline
build: name: default
image: python:3
volumes: steps:
- name: dockersock - name: build
path: /var/run/docker.sock image: python:3
commands: volumes:
- apt update -y - name: dockersock
- apt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2 curl path: /var/run/docker.sock
- curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - commands:
- add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" - apt update -y
- apt update -y - apt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2 curl
- apt install -y docker-ce - curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
- apt install -y curl python-tk - add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
- pip install -U pip - apt update -y
- curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose - apt install -y docker-ce
- chmod +x /usr/local/bin/docker-compose - apt install -y curl python-tk
- docker-compose --version - pip install -U pip
- pip install -r dev-requirements.txt - curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
- git clone https://github.com/tsileo/poussetaches.git && cd poussetaches && docker build . -t poussetaches:latest && cd - - chmod +x /usr/local/bin/docker-compose
- mypy --ignore-missing-imports . - docker-compose --version
- flake8 activitypub.py - pip install -r dev-requirements.txt
- cp -r tests/fixtures/me.yml config/me.yml - git clone https://github.com/tsileo/poussetaches.git && cd poussetaches && docker build . -t poussetaches:latest && cd -
- docker build . -t microblogpub:latest - mypy --ignore-missing-imports .
- docker-compose up -d - flake8 activitypub.py
- docker-compose ps - cp -r tests/fixtures/me.yml config/me.yml
- WEB_PORT=5006 COMPOSE_PROJECT_NAME=instance1 CONFIG_DIR=./tests/fixtures/instance1/config docker-compose -p instance1 -f docker-compose-tests.yml up -d - docker build . -t microblogpub:latest
- docker-compose -p instance1 -f docker-compose-tests.yml ps - docker-compose up -d
- WEB_PORT=5007 COMPOSE_PROJECT_NAME=instance2 CONFIG_DIR=./tests/fixtures/instance2/config docker-compose -p instance2 -f docker-compose-tests.yml up -d - docker-compose ps
- docker-compose -p instance2 -f docker-compose-tests.yml ps - WEB_PORT=5006 COMPOSE_PROJECT_NAME=instance1 CONFIG_DIR=./tests/fixtures/instance1/config docker-compose -p instance1 -f docker-compose-tests.yml up -d
- sleep 5 - docker-compose -p instance1 -f docker-compose-tests.yml ps
# Integration tests first - WEB_PORT=5007 COMPOSE_PROJECT_NAME=instance2 CONFIG_DIR=./tests/fixtures/instance2/config docker-compose -p instance2 -f docker-compose-tests.yml up -d
- python -m pytest -v --ignore data -k integration - docker-compose -p instance2 -f docker-compose-tests.yml ps
# Federation tests (with two local instances) - sleep 5
- python -m pytest -v -s --ignore data -k federatio # 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 federatio
volumes: volumes:
- name: dockersock - name: dockersock