From 1a82472596ca99a9825c56fdc5d7dc07b2e9999b Mon Sep 17 00:00:00 2001 From: Fabian Peter Hammerle Date: Sat, 20 Feb 2021 09:35:37 +0100 Subject: [PATCH] refactor pipeline config: detect top level module name automatically https://github.com/fphammerle/ical2vdir/commit/a6304756833de87af7317767452cfeaa2a54e179 --- .github/workflows/python.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 4a8cd66..e75b048 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -51,13 +51,13 @@ jobs: env: PYTHON_VERSION: ${{ matrix.python-version }} - run: pipenv graph - - run: pipenv run pytest --cov=switchbot_mqtt --cov-report=term-missing --cov-fail-under=100 + - run: pipenv run pytest --cov="$(cat *.egg-info/top_level.txt)" --cov-report=term-missing --cov-fail-under=100 # https://github.com/PyCQA/pylint/issues/3882 - run: python3 -c 'import sys; sys.exit(sys.version_info < (3, 9))' - || pipenv run pylint --load-plugins=pylint_import_requirements switchbot_mqtt + || pipenv run pylint --load-plugins=pylint_import_requirements "$(cat *.egg-info/top_level.txt)" # https://github.com/PyCQA/pylint/issues/352 - run: pipenv run pylint --disable=duplicate-code tests/* - - run: pipenv run mypy switchbot_mqtt tests + - run: pipenv run mypy "$(cat *.egg-info/top_level.txt)" tests # >=1.9.0 to detect branch name # https://github.com/coveralls-clients/coveralls-python/pull/207 # https://github.com/coverallsapp/github-action/issues/4#issuecomment-547036866