Kaydet (Commit) 5c6934d5 authored tarafından Batuhan Osman TASKAYA's avatar Batuhan Osman TASKAYA

base jenkins file demo

üst 0c9957fa
pipeline {
agent { docker { image 'python:3.7.1' } }
stages {
stage('prepare') {
steps {
sh 'python -m venv .venv'
sh """. .venv/bin/activate
pip install pytest twine
pip install -e ."""
}
}
stage('test') {
steps {
sh """. .venv/bin/activate
pytest --junit-xml=test_results.xml tests/
"""
}
}
stage('build') {
steps {
sh """. .venv/bin/activate
python setup.py sdist
"""
}
}
stage('deploy_pypi') {
environment {
TWINE_REPOSITORY = 'https://pypi.kernel.live'
PYPI = credentials('local-pypi')
}
steps {
sh """. .venv/bin/activate
twine upload -u $PYPI_USR -p $PYPI_PSW dist/*
"""
}
}
}
post {
always {
junit 'test_results.xml'
}
}
}
......@@ -12,5 +12,8 @@ class TestMisc(unittest.TestCase):
self.assertEqual(border_style.value, "5px solid rgb(255, 0, 0)")
def test_numeric_plus_color(self):
self.assertEqual(NumericValue(15, "%") + ColorValue("ff","ff","ff","hex"), "15% #ffffff")
if __name__ == "__main__":
unittest.main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment