2022-01-29 15:04:27 +00:00
|
|
|
kind: pipeline
|
2022-10-22 14:54:37 +01:00
|
|
|
type: docker
|
|
|
|
name: test and build
|
2022-01-29 15:04:27 +00:00
|
|
|
|
|
|
|
steps:
|
2022-10-22 14:54:37 +01:00
|
|
|
- name: test
|
2022-01-29 15:04:27 +00:00
|
|
|
image: python:3.7
|
|
|
|
commands:
|
|
|
|
- pip install poetry
|
|
|
|
- poetry install
|
2022-10-22 14:54:37 +01:00
|
|
|
- poetry run pytest
|
|
|
|
|
|
|
|
- name: publish
|
2022-10-22 16:03:27 +01:00
|
|
|
# when:
|
|
|
|
# branch:
|
|
|
|
# - master
|
|
|
|
# event:
|
|
|
|
# exclude:
|
|
|
|
# - pull_request
|
2022-10-22 15:27:43 +01:00
|
|
|
image: python:3.7
|
2022-10-22 14:54:37 +01:00
|
|
|
environment:
|
|
|
|
GITEA_PACKAGE_REPO:
|
2022-10-22 15:58:41 +01:00
|
|
|
from_secret: GITEA_PACKAGE_REPO
|
2022-10-22 14:54:37 +01:00
|
|
|
GITEA_OWNER:
|
2022-10-22 15:58:41 +01:00
|
|
|
from_secret: GITEA_OWNER
|
2022-10-22 14:54:37 +01:00
|
|
|
GITEA_TOKEN:
|
2022-10-22 15:58:41 +01:00
|
|
|
from_secret: GITEA_TOKEN
|
2022-10-22 14:54:37 +01:00
|
|
|
commands:
|
|
|
|
- pip install poetry twine
|
|
|
|
- poetry build
|
2022-10-22 16:03:27 +01:00
|
|
|
- echo "[distutils]\nindex-servers = gitea\n\n[gitea]\nrepository = $${GITEA_PACKAGE_REPO}\nusername = $${GITEA_OWNER}\npassword = $${GITEA_TOKEN}" > ~/.pypirc
|
2022-10-22 14:57:59 +01:00
|
|
|
- twine upload -r gitea ./dist/*.whl
|
2022-10-22 14:54:37 +01:00
|
|
|
|
|
|
|
|