diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ebc8323..7d11945 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -9,3 +9,32 @@ jobs: steps: - uses: actions/checkout@v1 - uses: max/secret-scan@master + python: + name: Python tests + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [3.6, 3.7] + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pipenv + pipenv sync --dev + - name: Lint with mypy + run: | + find ${GITHUB_WORKSPACE} -name '*.py' ! -name '*_types.py' -exec pipenv run mypy {} + + - name: Lint with flake8 + run: | + pipenv run flake8 --exclude=tests ${GITHUB_WORKSPACE} --count --show-source --statistics + - name: Lint with pylint + run: | + find ${GITHUB_WORKSPACE} -name '*.py' | xargs pipenv run pylint --rcfile=.pylintrc + - name: Test with pytest + run: pipenv run pytest diff --git a/.vscode/settings.json b/.vscode/settings.json index 38afabc..15cd44d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -114,6 +114,7 @@ "moto", "mountpoint", "mssql", + "mypy", "nacl", "nargs", "networklb", @@ -141,6 +142,7 @@ "pyinstaller", "pylint", "pylintrc", + "pytest", "qrcode", "quickstart", "rcfile", @@ -193,6 +195,7 @@ "weirdnesses", "whichenv", "winrm", + "xargs", "xenial", "xlarge", "xrange", diff --git a/Pipfile b/Pipfile index 9cfff11..3c61a15 100644 --- a/Pipfile +++ b/Pipfile @@ -16,3 +16,4 @@ pylint = "~= 2.0" # python3 flake8-docstrings fails with pydocstyle 4: # https://github.com/PyCQA/pydocstyle/issues/375 pydocstyle = '<4.0.0' +pytest = '~= 5.1' diff --git a/Pipfile.lock b/Pipfile.lock index 9a94a46..70a4712 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "6e8b10aba81628ec456f846915c8dd8dcedd2253b91fcba951deef1da169fcc3" + "sha256": "0d59794f4361c0f7aa80f7293847705496723f45b3f16f3fc0a4033de8e9da5a" }, "pipfile-spec": 6, "requires": {}, @@ -492,6 +492,20 @@ ], "version": "==2.2.5" }, + "atomicwrites": { + "hashes": [ + "sha256:03472c30eb2c5d1ba9227e4c2ca66ab8287fbfbbda3888aa93dc2e28fc6811b4", + "sha256:75a9445bac02d8d058d5e1fe689654ba5a6556a1dfd8ce6ec55a0ed79866cfa6" + ], + "version": "==1.3.0" + }, + "attrs": { + "hashes": [ + "sha256:69c0dbf2ed392de1cb5ec704444b08a5ef81680a61cb899dc08127123af36a79", + "sha256:f0b870f674851ecbfbbbd364d6b5cbdff9dcedbc7f3f5e18a6891057f21fe399" + ], + "version": "==19.1.0" + }, "entrypoints": { "hashes": [ "sha256:589f874b313739ad35be6e0cd7efde2a4e9b6fea91edcc34e58ecbb8dbe56d19", @@ -520,6 +534,14 @@ ], "version": "==1.0.2" }, + "importlib-metadata": { + "hashes": [ + "sha256:9ff1b1c5a354142de080b8a4e9803e5d0d59283c93aed808617c787d16768375", + "sha256:b7143592e374e50584564794fcb8aaf00a23025f9db866627f89a21491847a8d" + ], + "markers": "python_version < '3.8'", + "version": "==0.20" + }, "isort": { "hashes": [ "sha256:54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1", @@ -557,6 +579,13 @@ ], "version": "==0.6.1" }, + "more-itertools": { + "hashes": [ + "sha256:409cd48d4db7052af495b09dec721011634af3753ae1ef92d2b32f73a745f832", + "sha256:92b8c4b06dac4f0611c0729b2f2ede52b2e1bac1ab48f089c7ddc12e26bb60c4" + ], + "version": "==7.2.0" + }, "mypy": { "hashes": [ "sha256:0107bff4f46a289f0e4081d59b77cef1c48ea43da5a0dbf0005d54748b26df2a", @@ -581,6 +610,13 @@ ], "version": "==0.4.1" }, + "packaging": { + "hashes": [ + "sha256:a7ac867b97fdc07ee80a8058fe4435ccd274ecc3b0ed61d852d7d53055528cf9", + "sha256:c491ca87294da7cc01902edbe30a5bc6c4c28172b5138ab4e4aa1b9d7bfaeafe" + ], + "version": "==19.1" + }, "pep8-naming": { "hashes": [ "sha256:01cb1dab2f3ce9045133d08449f1b6b93531dceacb9ef04f67087c11c723cea9", @@ -588,6 +624,20 @@ ], "version": "==0.8.2" }, + "pluggy": { + "hashes": [ + "sha256:0825a152ac059776623854c1543d65a4ad408eb3d33ee114dff91e57ec6ae6fc", + "sha256:b9817417e95936bf75d85d3f8767f7df6cdde751fc40aed3bb3074cbcb77757c" + ], + "version": "==0.12.0" + }, + "py": { + "hashes": [ + "sha256:64f65755aee5b381cea27766a3a147c3f15b9b6b9ac88676de66ba2ae36793fa", + "sha256:dc639b046a6e2cff5bbe40194ad65936d6ba360b52b3c3fe1d08a82dd50b5e53" + ], + "version": "==1.8.0" + }, "pycodestyle": { "hashes": [ "sha256:95a2219d12372f05704562a14ec30bc76b05a5b297b21a5dfe3f6fac3491ae56", @@ -617,6 +667,21 @@ ], "version": "==2.3.1" }, + "pyparsing": { + "hashes": [ + "sha256:6f98a7b9397e206d78cc01df10131398f1c8b8510a2f4d97d9abd82e1aacdd80", + "sha256:d9338df12903bbf5d65a0e4e87c2161968b10d2e489652bb47001d82a9b028b4" + ], + "version": "==2.4.2" + }, + "pytest": { + "hashes": [ + "sha256:95d13143cc14174ca1a01ec68e84d76ba5d9d493ac02716fd9706c949a505210", + "sha256:b78fe2881323bd44fd9bd76e5317173d4316577e7b1cddebae9136a4495ec865" + ], + "index": "pypi", + "version": "==5.1.2" + }, "six": { "hashes": [ "sha256:3350809f0555b11f552448330d0b52d5f24c91a322ea4a15ef22629740f3761c", @@ -659,11 +724,25 @@ ], "version": "==3.7.4" }, + "wcwidth": { + "hashes": [ + "sha256:3df37372226d6e63e1b1e1eda15c594bca98a22d33a23832a90998faa96bc65e", + "sha256:f4ebe71925af7b40a864553f761ed559b43544f8f71746c2d756c7fe788ade7c" + ], + "version": "==0.1.7" + }, "wrapt": { "hashes": [ "sha256:565a021fd19419476b9362b05eeaa094178de64f8361e44468f9e9d7843901e1" ], "version": "==1.11.2" + }, + "zipp": { + "hashes": [ + "sha256:3718b1cbcd963c7d4c5511a8240812904164b7f381b647143a89d3b98f9bcd8e", + "sha256:f06903e9f1f43b12d371004b4ac7b06ab39a44adc747266928ae6debfa7b3335" + ], + "version": "==0.6.0" } } } diff --git a/tests/test_placeholder.py b/tests/test_placeholder.py new file mode 100644 index 0000000..feed646 --- /dev/null +++ b/tests/test_placeholder.py @@ -0,0 +1,5 @@ +"""A placeholder for tests.""" + + +def test_placeholder() -> None: + """Placeholder for tests."""