pykeydelivery/.gitlab-ci.yml
2023-08-25 08:03:17 +02:00

29 lines
No EOL
568 B
YAML

image: python:3.10
stages:
- test
- publish
before_script:
- python -V
- python -m venv venv
- source venv/bin/activate
- pip install -U pip
- pip install .
test:
stage: test
script:
- echo "[KeyDelivery]" > config.ini
- echo "key = ${API_KEY}" >> config.ini
- echo "secret = ${API_SECRET}" >> config.ini
- python -m unittest test.py
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