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
|
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- master
|
|
|
|
image: python3.7
|
|
|
|
environment:
|
|
|
|
GITEA_PACKAGE_REPO:
|
|
|
|
from_secret: gitea_package_repo
|
|
|
|
GITEA_OWNER:
|
|
|
|
from_secret: gitea_owner
|
|
|
|
GITEA_TOKEN:
|
|
|
|
from_secret: gitea_token
|
|
|
|
commands:
|
|
|
|
- pip install poetry twine
|
|
|
|
- poetry build
|
|
|
|
- echo "[distutils]\nindex-servers = gitea\n\n[gitea]\nrepository = ${GITEA_PACKAGE_REPO}\nusername = ${GITEA_OWNER}\npassword = ${GITEA_TOKEN}"
|
|
|
|
|
|
|
|
|