From b8be14da88a257ddbfc92b8d57af115a996f930e Mon Sep 17 00:00:00 2001 From: KKlochko Date: Mon, 19 Jun 2023 09:58:09 +0300 Subject: [PATCH] Add the CI/CD configuration and tests. --- .drone.yaml | 30 ++++++++++++++++++++++++++++++ CHANGELOG.org | 2 ++ pyproject.toml | 2 +- 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .drone.yaml diff --git a/.drone.yaml b/.drone.yaml new file mode 100644 index 0000000..0fca234 --- /dev/null +++ b/.drone.yaml @@ -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 diff --git a/CHANGELOG.org b/CHANGELOG.org index 2151111..631de44 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -6,4 +6,6 @@ Added the function that gets a list of tags from a repository. ** 0.3.0 <2023-06-18 Sun> Added the filter option for a list of tags. +** 0.3.1 <2023-06-19 Mon> + Added the CI/CD configuration and tests. diff --git a/pyproject.toml b/pyproject.toml index c39e34d..451de93 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "docker-tags-getter" -version = "0.3.0" +version = "0.3.1" description = "" authors = ["Kostiantyn Klochko "] readme = "README.rst"