mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-14 18:54:27 +00:00
Fix drone file
This commit is contained in:
parent
090e68fa8b
commit
98b16f0da4
1 changed files with 38 additions and 35 deletions
73
.drone.yml
73
.drone.yml
|
@ -1,38 +1,41 @@
|
|||
pipeline:
|
||||
build:
|
||||
image: python:3
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run/docker.sock
|
||||
commands:
|
||||
- apt update -y
|
||||
- apt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2 curl
|
||||
- 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
|
||||
- apt install -y curl python-tk
|
||||
- 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
|
||||
- docker-compose up -d
|
||||
- docker-compose 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
|
||||
- docker-compose -p instance1 -f docker-compose-tests.yml ps
|
||||
- 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 -p instance2 -f docker-compose-tests.yml ps
|
||||
- sleep 5
|
||||
# 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
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: python:3
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run/docker.sock
|
||||
commands:
|
||||
- apt update -y
|
||||
- apt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2 curl
|
||||
- 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
|
||||
- apt install -y curl python-tk
|
||||
- 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
|
||||
- docker-compose up -d
|
||||
- docker-compose 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
|
||||
- docker-compose -p instance1 -f docker-compose-tests.yml ps
|
||||
- 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 -p instance2 -f docker-compose-tests.yml ps
|
||||
- sleep 5
|
||||
# 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:
|
||||
- name: dockersock
|
||||
|
|
Loading…
Reference in a new issue