2019-11-25 02:48:12 +01:00
|
|
|
---
|
|
|
|
image: python:3.8
|
|
|
|
|
|
|
|
stages:
|
|
|
|
- test
|
|
|
|
- build
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
before_script:
|
2019-11-25 02:51:37 +01:00
|
|
|
- pip3 install coverage pycodestyle
|
2019-11-25 02:48:12 +01:00
|
|
|
- export SPACEAPI_SERVER_VERSION=$(python -c 'import spaceapi_server; print(spaceapi_server.__version__)')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test:
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- pip3 install -e .
|
|
|
|
- python3 -m coverage run --rcfile=setup.cfg -m unittest discover spaceapi_server
|
|
|
|
- python3 -m coverage combine
|
|
|
|
- python3 -m coverage report --rcfile=setup.cfg
|
|
|
|
|
|
|
|
codestyle:
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- pip3 install -e .
|
|
|
|
- pycodestyle spaceapi_server
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
build_wheel:
|
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- python3 setup.py egg_info bdist_wheel
|
|
|
|
- cd dist
|
|
|
|
- sha256sum *.whl > SHA256SUMS
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- "dist/*.whl"
|
|
|
|
- dist/SHA256SUMS
|
|
|
|
only:
|
|
|
|
- tags
|