diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml new file mode 100644 index 0000000..33114da --- /dev/null +++ b/.github/workflows/python-test.yml @@ -0,0 +1,32 @@ +name: Python package + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.6, 3.7, 3.8, 3.9] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest +# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Test with pytest + run: | + pytest +# - name: Lint with flake8 +# run: | +# # stop the build if there are Python syntax errors or undefined names +# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics +# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide +# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..218edad --- /dev/null +++ b/setup.cfg @@ -0,0 +1,13 @@ +[tool:pytest] +# If a pytest section is found in one of the possible config files +# (pytest.ini, tox.ini or setup.cfg), then pytest will not look for any others, +# so if you add a pytest config section elsewhere, +# you will need to delete this section from setup.cfg. +addopts = + -ra + --strict + --doctest-modules + --doctest-glob=\*.rst + --tb=short +testpaths = + tests \ No newline at end of file diff --git a/setup.py b/setup.py index beeade0..e2bf43a 100644 --- a/setup.py +++ b/setup.py @@ -14,6 +14,7 @@ url='https://github.com/starkbank/febraban.git', author="Stark Bank", author_email="developers@starkbank.com", + tests_require=['pytest'], keywords=["febraban", "cnab", "cnab 240", "cnab240", "febraban240", "transfer", "billing", "bank"], version="0.6.0" ) diff --git a/febraban/cnab240/tests/__init__.py b/tests/__init__.py similarity index 100% rename from febraban/cnab240/tests/__init__.py rename to tests/__init__.py diff --git a/febraban/cnab240/tests/itau/__init__.py b/tests/itau/__init__.py similarity index 100% rename from febraban/cnab240/tests/itau/__init__.py rename to tests/itau/__init__.py diff --git a/febraban/cnab240/tests/itau/charge/__init__.py b/tests/itau/charge/__init__.py similarity index 100% rename from febraban/cnab240/tests/itau/charge/__init__.py rename to tests/itau/charge/__init__.py diff --git a/febraban/cnab240/tests/itau/charge/cancelTest.py b/tests/itau/charge/test_cancelTest.py similarity index 100% rename from febraban/cnab240/tests/itau/charge/cancelTest.py rename to tests/itau/charge/test_cancelTest.py diff --git a/febraban/cnab240/tests/itau/charge/parserTest.py b/tests/itau/charge/test_parser.py similarity index 100% rename from febraban/cnab240/tests/itau/charge/parserTest.py rename to tests/itau/charge/test_parser.py diff --git a/febraban/cnab240/tests/itau/charge/segmentPTest.py b/tests/itau/charge/test_segmentP.py similarity index 100% rename from febraban/cnab240/tests/itau/charge/segmentPTest.py rename to tests/itau/charge/test_segmentP.py diff --git a/febraban/cnab240/tests/itau/charge/segmentQTest.py b/tests/itau/charge/test_segmentQ.py similarity index 100% rename from febraban/cnab240/tests/itau/charge/segmentQTest.py rename to tests/itau/charge/test_segmentQ.py diff --git a/febraban/cnab240/tests/itau/charge/slipTest.py b/tests/itau/charge/test_slip.py similarity index 100% rename from febraban/cnab240/tests/itau/charge/slipTest.py rename to tests/itau/charge/test_slip.py diff --git a/febraban/cnab240/tests/itau/transfer/__init__.py b/tests/itau/transfer/__init__.py similarity index 100% rename from febraban/cnab240/tests/itau/transfer/__init__.py rename to tests/itau/transfer/__init__.py diff --git a/febraban/cnab240/tests/itau/transfer/fileTest.py b/tests/itau/transfer/test_file.py similarity index 100% rename from febraban/cnab240/tests/itau/transfer/fileTest.py rename to tests/itau/transfer/test_file.py diff --git a/febraban/cnab240/tests/itau/transfer/parserTest.py b/tests/itau/transfer/test_parser.py similarity index 100% rename from febraban/cnab240/tests/itau/transfer/parserTest.py rename to tests/itau/transfer/test_parser.py diff --git a/febraban/cnab240/tests/itau/transfer/paymentTest.py b/tests/itau/transfer/test_payment.py similarity index 100% rename from febraban/cnab240/tests/itau/transfer/paymentTest.py rename to tests/itau/transfer/test_payment.py