2023-08-16 09:28:38 +00:00
|
|
|
image: python:3.10
|
|
|
|
|
|
|
|
stages:
|
|
|
|
- test
|
2023-08-25 06:02:26 +00:00
|
|
|
- deploy
|
2023-08-16 09:28:38 +00:00
|
|
|
|
|
|
|
before_script:
|
|
|
|
- python -V
|
|
|
|
- python -m venv venv
|
|
|
|
- source venv/bin/activate
|
|
|
|
- pip install -U pip
|
|
|
|
- pip install .
|
2023-08-25 06:02:26 +00:00
|
|
|
|
|
|
|
test:
|
|
|
|
stage: test
|
|
|
|
script:
|
2023-08-16 09:38:00 +00:00
|
|
|
- echo "[KeyDelivery]" > config.ini
|
|
|
|
- echo "key = ${API_KEY}" >> config.ini
|
|
|
|
- echo "secret = ${API_SECRET}" >> config.ini
|
2023-08-25 06:02:26 +00:00
|
|
|
- python -m unittest test.py
|
2023-08-16 09:28:38 +00:00
|
|
|
|
2023-08-25 06:02:26 +00:00
|
|
|
publish:
|
|
|
|
stage: publish
|
|
|
|
script:
|
|
|
|
- pip install -U hatchling twine build
|
|
|
|
- python -m build .
|
|
|
|
- python -m twine upload --username __token__ --password ${PYPI_TOKEN} dist/*
|
|
|
|
only:
|
|
|
|
- tags
|