diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..c1896d9 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,7 @@ +./lint.sh && \ +./test.sh && \ +python3 -m pip install --upgrade build && \ +python3 -m pip install --upgrade twine && \ +rm -rf dist && \ +python3 -m build && \ +python3 -m twine upload dist/* diff --git a/lint-and-test.sh b/lint-and-test.sh new file mode 100755 index 0000000..2a12451 --- /dev/null +++ b/lint-and-test.sh @@ -0,0 +1 @@ +./lint.sh && ./test.sh diff --git a/test.sh b/test.sh new file mode 100755 index 0000000..7e13e6e --- /dev/null +++ b/test.sh @@ -0,0 +1 @@ +pytest --cov=serializable/ --cov-report=term-missing tests diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/common.py b/tests/common.py new file mode 100644 index 0000000..d0c5ae3 --- /dev/null +++ b/tests/common.py @@ -0,0 +1,17 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +def eq_(x, y, s=None): + if s: + assert x == y, s + else: + assert x == y \ No newline at end of file