87 lines
2.7 KiB
YAML
87 lines
2.7 KiB
YAML
---
|
|
priviliged: true
|
|
kind: pipeline
|
|
name: default
|
|
steps:
|
|
- name: test
|
|
image: python:3
|
|
commands:
|
|
- pip install -U pip
|
|
- pip install mypy flake8 black
|
|
# - black --check .
|
|
- flake8 activitypub.py
|
|
- mypy --ignore-missing-imports .
|
|
|
|
- name: build
|
|
image: docker:dind
|
|
environment:
|
|
DOCKER_HOST: tcp://docker:2375
|
|
commands:
|
|
- apk update && apk upgrade && apk add --no-cache bash git openssh curl
|
|
- git clone https://github.com/tsileo/poussetaches.git pt && cd pt && docker build . -t poussetaches:latest && cd - && rm -rf pt
|
|
- docker network create fede
|
|
- docker pull mongo
|
|
- docker build . -t microblogpub:latest
|
|
|
|
- name: poussetaches
|
|
image: docker:dind
|
|
detach: true
|
|
environment:
|
|
DOCKER_HOST: tcp://docker:2375
|
|
POUSSETACHES_AUTH_KEY: lol
|
|
commands:
|
|
- docker run -p 7991:7991 --net fede -e POUSSETACHES_AUTH_KEY --name poussetaches poussetaches
|
|
|
|
- name: mongo
|
|
image: docker:dind
|
|
detach: true
|
|
environment:
|
|
DOCKER_HOST: tcp://docker:2375
|
|
commands:
|
|
- docker run -p 27017:27017 --net fede --name mongo mongo
|
|
|
|
- name: microblogpub_instance1
|
|
image: docker:dind
|
|
detach: true
|
|
environment:
|
|
DOCKER_HOST: tcp://docker:2375
|
|
MICROBLOGPUB_DEBUG: 1
|
|
MICROBLOGPUB_POUSSETACHES_HOST: http://poussetaches:7991
|
|
MICROBLOGPUB_INTERNAL_HOST: http://instance1_web:5005
|
|
MICROBLOGPUB_MONGODB_HOST: mongo:27017
|
|
POUSSETACHES_AUTH_KEY: lol
|
|
commands:
|
|
- sleep 5
|
|
- 'docker run -p 5006:5005 --net fede -v "`pwd`/tests/fixtures/instance1/config:/app/config" -e MICROBLOGPUB_DEBUG -e MICROBLOGPUB_INTERNAL_HOST -e MICROBLOGPUB_MONGODB_HOST -e POUSSETACHES_AUTH_KEY --name instance1_web microblogpub'
|
|
|
|
- name: microblogpub_instance2
|
|
image: docker:dind
|
|
detach: true
|
|
environment:
|
|
DOCKER_HOST: tcp://docker:2375
|
|
MICROBLOGPUB_DEBUG: 1
|
|
MICROBLOGPUB_POUSSETACHES_HOST: http://poussetaches:7991
|
|
MICROBLOGPUB_INTERNAL_HOST: http://instance2_web:5005
|
|
MICROBLOGPUB_MONGODB_HOST: mongo:27017
|
|
POUSSETACHES_AUTH_KEY: lol
|
|
commands:
|
|
- 'docker run -p 5007:5005 --net fede -v "`pwd`/tests/fixtures/instance2/config:/app/config" -e MICROBLOGPUB_DEBUG -e MICROBLOGPUB_INTERNAL_HOST -e MICROBLOGPUB_MONGODB_HOST -e POUSSETACHES_AUTH_KEY --name instance2_web microblogpub'
|
|
|
|
|
|
- name: integration_test
|
|
image: python:3
|
|
commands:
|
|
- pip install -U pip
|
|
- pip install -r dev-requirements.txt
|
|
# Federation tests (with two local instances)
|
|
- python -m pytest -v -s --ignore data -k federatio
|
|
|
|
services:
|
|
- name: docker
|
|
image: docker:dind
|
|
privileged: true
|
|
---
|
|
kind: signature
|
|
hmac: e9e0af1e17c84ff087d83fbdd00ba132327cca9365b9805486d5a295443a5bd3
|
|
|
|
...
|