diff --git a/.hgignore b/.gitignore similarity index 65% rename from .hgignore rename to .gitignore index d95b5a7..9fac96c 100644 --- a/.hgignore +++ b/.gitignore @@ -1,6 +1,3 @@ -# use glob syntax. -syntax: glob - *.pyc *.swp *.orig @@ -9,3 +6,5 @@ syntax: glob build/* .cache/* .pytest_cache/* +env/* +dist/* diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..68eb5db --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,14 @@ +stages: + - test + #- build + #- deploy + +test: + stage: test + tags: ["build"] + script: make test + artifacts: + paths: + - env.vanilla + expire_in: 1 hour + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..58aee20 --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +env: + python3 -m venv env + . env/bin/activate + env/bin/pip install --upgrade pip + +test: env + #env/bin/py.test --lf + env/bin/pip install --upgrade -r requirements-test.txt + env/bin/py.test diff --git a/miniuri/tests/__init__.py b/miniuri/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test_miniuri.py b/miniuri/tests/test_miniuri.py similarity index 99% rename from test_miniuri.py rename to miniuri/tests/test_miniuri.py index 22300b1..30a1a95 100644 --- a/test_miniuri.py +++ b/miniuri/tests/test_miniuri.py @@ -1,6 +1,6 @@ from unittest import TestCase -from miniuri import Uri +from ..miniuri import Uri class TestMiniUri(TestCase): diff --git a/requirements-test.txt b/requirements-test.txt new file mode 100644 index 0000000..e83cf3d --- /dev/null +++ b/requirements-test.txt @@ -0,0 +1,5 @@ +# testing. +pytest +pytest-cov +nose +twine diff --git a/setup.py b/setup.py index 446a57b..e9f7fed 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages setup( name="miniuri", - version="1.0.8", + version="1.0.9", long_description=open("README.rst").read(), description="miniuri: The Universal URI Parser", keywords="miniuri uri url parser", @@ -13,7 +13,7 @@ setup( url="https://git.unturf.com/python/miniuri", platforms=["All"], license="Public Domain", - packages=find_packages(), + packages=find_packages(exclude="tests"), include_package_data=True, classifiers=[ # Specify the Python versions you support here. In particular, ensure @@ -37,4 +37,6 @@ setup( # setup keyword args: http://peak.telecommunity.com/DevCenter/setuptools # built and uploaded to pypi with this: -# python setup.py sdist bdist_egg register upload +#python setup.py sdist bdist_egg +#twine upload dist/* +