Files
lmwsip/.drone.yml
Marcel Nijenhof d0043f3f18
Some checks failed
continuous-integration/drone/push Build is failing
Upload pypi test
2022-01-02 23:45:44 +01:00

182 lines
3.1 KiB
YAML

---
kind: pipeline
type: exec
name: CentOS7_test
platform:
os: linux
arch: amd64
variant: CentOS7
steps:
- name: Run unit test
environment:
PYTHONPATH: ..
commands:
- cd src
- python3 -m unittest -v lmwsip.tests
---
kind: pipeline
type: exec
name: CentOS8_test
platform:
os: linux
arch: amd64
variant: CentOS8
steps:
- name: Run unit test
environment:
PYTHONPATH: .
commands:
- cd src
- python3 -m unittest -v lmwsip.tests
---
kind: pipeline
type: exec
name: Ubuntu1804_test
platform:
os: linux
arch: amd64
variant: Ubuntu1804
steps:
- name: Run unit test
environment:
PYTHONPATH: .
commands:
- cd src
- python3 -m unittest -v lmwsip.tests
---
kind: pipeline
type: exec
name: Fedora_test
platform:
os: linux
arch: amd64
variant: Fedora
steps:
- name: Run unit test
environment:
PYTHONPATH: .
commands:
- tox
---
kind: pipeline
type: docker
name: docker_python:3.6
steps:
- name: Run unit test
image: python:3.6
environment:
PYTHONPATH: .
commands:
- pip install python-dateutil
- cd src
- python -m unittest -v lmwsip.tests
---
kind: pipeline
type: docker
name: docker_python:latest
steps:
- name: Run unit test
image: python:latest
environment:
PYTHONPATH: .
commands:
- pip install python-dateutil
- python --version
- cd src
- python -m unittest -v lmwsip.tests
---
kind: pipeline
type: exec
name: Build
platform:
os: linux
arch: amd64
variant: Fedora
steps:
- name: Build package files
commands:
- python3 -m build
- name: Run final test after build
commands:
- tox
- name: Versie toevoegen aan download
environment:
DOWNLOADDIR: /usr/share/nginx/html/download/python/lmwsip
commands:
- mkdir -p "$${DOWNLOADDIR}"
- cd dist
- |
for f in *
do
if [ -f "$${DOWNLOADDIR}/$${f}" ]
then
echo version error
exit 1
else
cp "$${f}" "$${DOWNLOADDIR}";
fi
done
- ls -l "$${DOWNLOADDIR}"
- name: Versie upload naar pypi test
environment:
TWINE_USERNAME:
from_secret: twine_username
TWINE_PASSWORD:
from_secret: twine_password
commands:
- python3 -m twine upload --repository testpypi dist/*
when:
branch:
- master
depends_on:
- CentOS7_test
- CentOS8_test
- Ubuntu1804_test
- Fedora_test
- docker_python:latest
- docker_python:3.6
---
kind: pipeline
type: docker
name: installCheck
steps:
- name: install Check
image: python:3.6
# Make sure we run the pip installed version
commands:
- rm -rf src
- pip install --extra-index-url https://marceln.org/download/python lmwsip
- python -c "import lmwsip"
- python -c "import lmwsip; print(lmwsip.__version__)"
- >
[ $(python -c "import lmwsip; print(lmwsip.__version__)") =
$(python setup.py --version) ]
- python -m unittest -v lmwsip.tests
when:
branch:
- master
depends_on:
- Build