aiohttp-pydantic/.drone.yml
2021-07-26 06:58:02 +02:00

111 lines
2.4 KiB
YAML

---
kind: pipeline
type: docker
name: python-3-8
platform:
os: linux
arch: amd64
steps:
- name: Install package and test
image: python:3.8
commands:
- echo Install package
- pip install -U setuptools wheel pip; pip install .
- echo Test to import module of package
- python -c "import importlib, setuptools; [print(importlib.import_module(package).__name__, '[OK]') for package in setuptools.find_packages() if package.startswith('aiohttp_pydantic.') or package == 'aiohttp_pydantic']"
- echo Install CI dependencies
- pip install -r requirements/ci.txt
- echo Launch unittest
- pytest --cov-report=xml --cov=aiohttp_pydantic tests/
- echo Check the README.rst render
- python -m readme_renderer -o /dev/null README.rst
- name: coverage
image: plugins/codecov
settings:
files:
- coverage.xml
token: 9ea10e04-a71a-4eea-9dcc-8eaabe1479e2
trigger:
event:
- pull_request
- push
- tag
---
kind: pipeline
type: docker
name: python-3-9
platform:
os: linux
arch: amd64
steps:
- name: Install package and test
image: python:3.9
commands:
- echo Install package
- pip install -U setuptools wheel pip; pip install .
- echo Test to import module of package
- python -c "import importlib, setuptools; [print(importlib.import_module(package).__name__, '[OK]') for package in setuptools.find_packages() if package.startswith('aiohttp_pydantic.') or package == 'aiohttp_pydantic']"
- echo Install CI dependencies
- pip install -r requirements/ci.txt
- echo Launch unittest
- pytest --cov-report=xml --cov=aiohttp_pydantic tests/
- echo Check the README.rst render
- python -m readme_renderer -o /dev/null README.rst
- name: coverage
image: plugins/codecov
settings:
files:
- coverage.xml
token: 9ea10e04-a71a-4eea-9dcc-8eaabe1479e2
trigger:
event:
- pull_request
- push
- tag
---
kind: pipeline
type: docker
name: Deploy on Pypi
platform:
os: linux
arch: amd64
steps:
- name: Install twine and deploy
image: python3.8
commands:
- pip install --force-reinstall twine wheel
- python setup.py build bdist_wheel
- set +x
- twine upload --non-interactive -u "$pypi_username" -p "$pypi_password" dist/*
environment:
pypi_password:
from_secret: pypi_password
pypi_username:
from_secret: pypi_username
trigger:
event:
- tag
depends_on:
- python-3-8
- python-3-9
---
kind: signature
hmac: dfd0429e3b9f364147c56a400cf37466d0cbf0966e613f11b726777553fd9931
...