mirror of
https://github.com/cryptoadvance/specter-desktop.git
synced 2026-08-13 12:33:29 +02:00
* automate pip-packages-gen + upload for gittags release documentation proper package including and static + templates * Change import- and start logic, removed cli.py * project-renaming to cryptoadvance.specter propoer packaging include proper dependencies * Adding requirements.txt * Specify maintainers and thanks to contributors * Removing test-url for pip-uload. This is now live!
55 lines
1.7 KiB
YAML
55 lines
1.7 KiB
YAML
# this image contains python, bitcoind and docker
|
|
# check docker/python-bitcoind on how it's built
|
|
image: registry.gitlab.com/cryptoadvance/specter-desktop/python-bitcoind:latest
|
|
|
|
variables:
|
|
# Cache documentation: https://docs.gitlab.com/ee/ci/caching/
|
|
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
|
|
|
|
cache:
|
|
# enable per-job and per-branch caching
|
|
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
|
|
paths:
|
|
- .cache/pip
|
|
- .env/
|
|
|
|
stages:
|
|
- testing
|
|
- releasing
|
|
|
|
before_script:
|
|
- docker info # Print out docker version for debugging
|
|
- python -V # Print out python version for debugging
|
|
- apt update
|
|
- apt install -y libusb-1.0-0-dev libudev-dev # usb-support in hidapi
|
|
- pip install virtualenv
|
|
- virtualenv --python=python3 .env
|
|
- source .env/bin/activate
|
|
|
|
test:
|
|
stage: testing
|
|
script:
|
|
- pip3 install -r requirements.txt
|
|
- pip3 install -e .
|
|
# pytest --docker not working? Uncomment this for better debugging:
|
|
# - python3 tests/conftest.py
|
|
- pytest --docker
|
|
|
|
release:
|
|
stage: releasing
|
|
only:
|
|
- tags
|
|
script:
|
|
- pip3 install setuptools wheel twine
|
|
# verifying the version number follows vx.y.z (e.g. "v1.2.3")
|
|
- if ! [[ $CI_COMMIT_TAG =~ ^v[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}$ ]]; then exit 1; fi
|
|
# set version number in setup.py
|
|
- echo Releasing $CI_COMMIT_TAG
|
|
- sed -i "s/version=\".*/version=\"$CI_COMMIT_TAG\",/" setup.py
|
|
- cat setup.py
|
|
- python3 setup.py sdist bdist_wheel
|
|
# twine ready the password from the env-var TWINE_PASSWORD
|
|
# Add --repository-url https://test.pypi.org/legacy/ for testing the release procedure
|
|
- ls -l dist && python3 -m twine upload --verbose --user __token__ dist/*
|
|
|
|
|