Add the CI/CD configuration and tests.
continuous-integration/drone/push Build is failing

This commit is contained in:
2023-06-19 09:58:09 +03:00
parent 75358b59dd
commit b8be14da88
3 changed files with 33 additions and 1 deletions
+30
View File
@@ -0,0 +1,30 @@
kind: pipeline
type: docker
name: default
steps:
- name: run tests
image: python:3.10-alpine
commands:
- export POETRY_HOME=/opt/poetry
- python3 -m venv $POETRY_HOME
- $POETRY_HOME/bin/pip install poetry==1.3.2
- $POETRY_HOME/bin/poetry install
- $POETRY_HOME/bin/poetry run pytest -s
- name: publishing
image: python:3.10-alpine
environment:
PYPI_USERNAME:
from_secret: PYPI_USERNAME
PYPI_PASSWORD:
from_secret: PYPI_PASSWORD
commands:
- export POETRY_HOME=/opt/poetry
- python3 -m venv $POETRY_HOME
- $POETRY_HOME/bin/pip install poetry==1.3.2
- $POETRY_HOME/bin/poetry install
- $POETRY_HOME/bin/poetry publish --build --username $PYPI_USERNAME --password $PYPI_PASSWORD
when:
branch:
- main