Compare commits
3 Commits
b32bce956f
...
cec151e564
Author | SHA1 | Date | |
---|---|---|---|
cec151e564 | |||
26f1caa60e | |||
7092e69e6a |
175
.drone.yml
175
.drone.yml
@@ -1,175 +0,0 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: exec
|
||||
name: CentOS7_test
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
variant: CentOS7
|
||||
|
||||
steps:
|
||||
- name: Run unit test
|
||||
environment:
|
||||
PYTHONPATH: src
|
||||
commands:
|
||||
- python3 tests/main.py
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: exec
|
||||
name: CentOS8_test
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
variant: CentOS8
|
||||
|
||||
steps:
|
||||
- name: Run unit test
|
||||
environment:
|
||||
PYTHONPATH: src
|
||||
commands:
|
||||
- python3 tests/main.py
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: exec
|
||||
name: Ubuntu1804_test
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
variant: Ubuntu1804
|
||||
|
||||
steps:
|
||||
- name: Run unit test
|
||||
environment:
|
||||
PYTHONPATH: src
|
||||
commands:
|
||||
- python3 tests/main.py
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: exec
|
||||
name: Fedora_test
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
variant: Fedora
|
||||
|
||||
steps:
|
||||
- name: Run unit test
|
||||
environment:
|
||||
PYTHONPATH: src
|
||||
commands:
|
||||
- tox
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: docker_python:3.6
|
||||
|
||||
steps:
|
||||
- name: Run unit test
|
||||
image: python:3.6
|
||||
environment:
|
||||
PYTHONPATH: src
|
||||
commands:
|
||||
- pip install python-dateutil
|
||||
- python tests/main.py
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: docker_python:latest
|
||||
|
||||
steps:
|
||||
- name: Run unit test
|
||||
image: python:latest
|
||||
environment:
|
||||
PYTHONPATH: src
|
||||
commands:
|
||||
- pip install python-dateutil
|
||||
- python --version
|
||||
- python tests/main.py
|
||||
|
||||
---
|
||||
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 already availeble
|
||||
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 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 lmwsip
|
||||
- pip install lmwsip
|
||||
- python -c "import lmwsip"
|
||||
- python -c "import lmwsip; print(lmwsip.__version__)"
|
||||
- >
|
||||
[ $(python -c "import lmwsip; print(lmwsip.__version__)") =
|
||||
$(python setup.py --version) ]
|
||||
- python tests/main.py
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
|
||||
depends_on:
|
||||
- Build
|
21
.gitea/workflows/build.yml
Normal file
21
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
name: build
|
||||
on:
|
||||
- push
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: fedora-builder
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Build package
|
||||
run: python3 -m build
|
||||
- name: run tox
|
||||
run: tox
|
||||
- name: Upload na pypi
|
||||
env:
|
||||
TWINE_USERNAME: ${{ secret.PYPI_USER }}
|
||||
TWINE_PASSWORD: ${{ secret.PYPI_PASSWORD }}
|
||||
if: github.ref_type == 'tag'
|
||||
run: python3 -m twine upload dist/*
|
@@ -2,9 +2,10 @@
|
||||
|
||||
set -e
|
||||
|
||||
yamllint .gitea/workflows/*yml
|
||||
|
||||
VERSION=$(grep version setup.cfg | sed 's/.*= *//')
|
||||
sed -i "s/^__version__ = .*/__version__ = '${VERSION}'/" src/lmwsip/__init__.py
|
||||
git add src/lmwsip/__init__.py
|
||||
|
||||
tox
|
||||
yamllint .drone.yml
|
||||
|
Reference in New Issue
Block a user