diff --git a/.coveragerc b/.coveragerc index e9f3f11c..6720cf46 100644 --- a/.coveragerc +++ b/.coveragerc @@ -4,6 +4,8 @@ exclude_lines = # Don't complain if non-runnable code isn't run: if 0: if __name__ == __main__: +fail_under = 40 +show_missing = true [run] branch = True diff --git a/.github/workflows/ci-sphinx.yml b/.github/workflows/ci-sphinx.yml index 6256e789..6d4b7a21 100644 --- a/.github/workflows/ci-sphinx.yml +++ b/.github/workflows/ci-sphinx.yml @@ -22,11 +22,12 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 - - - name: Poetry Setup + - name: Setup Poetry + uses: Gr1N/setup-poetry@v7 + with: + poetry-preview: false + - name: Poetry install docs dependencies run: | - apt-get update -y && apt-get install curl - make poetry-download poetry --version poetry config virtualenvs.in-project false poetry config virtualenvs.create false diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e0585bc5..5380aa24 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -74,7 +74,7 @@ jobs: - name: Test MiV-OS using pytest if: startsWith(runner.os, 'macOS') run: | - poetry run pytest -c pyproject.toml --cov=miv --cov-report=xml + make test_ci - name: Upload coverage to Codecov uses: codecov/codecov-action@v2 with: diff --git a/Makefile b/Makefile index b147471d..9c5aca6c 100644 --- a/Makefile +++ b/Makefile @@ -35,11 +35,11 @@ formatting: codestyle #* Linting .PHONY: test test: - PYTHONPATH=$(PYTHONPATH) poetry run pytest -c pyproject.toml --cov-report=html --cov=miv tests/ + poetry run pytest -c pyproject.toml --cov=miv -.PHONY: coverage check -coverage: - PYTHONPATH=$(PYTHONPATH) poetry run pytest -c pyproject.toml --cov=miv tests/ +.PHONY: test_ci +test_ci: + poetry run pytest -c pyproject.toml --cov=miv --cov-report=xml .PHONY: check-codestyle check-codestyle: diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 85691b0f..00000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,13 +0,0 @@ -# File: docs/requirements.txt - -docutils -myst-nb -myst-parser -numpydoc -readthedocs-sphinx-search==0.1.1 -sphinx==4.4.0 -sphinx-autodoc-typehints -sphinx-book-theme -sphinx-copybutton -sphinx-togglebutton -sphinx_rtd_theme==1.0.0 diff --git a/pyproject.toml b/pyproject.toml index b6d151b1..61695556 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -168,16 +168,3 @@ addopts = [ # "--doctest-modules", TODO: Try to include pytest.doctest # "--doctest-continue-on-failure", ] - -[tool.coverage.run] -source = ["tests"] - -[coverage.paths] -source = "miv" - -[coverage.run] -branch = true - -[coverage.report] -fail_under = 50 -show_missing = true diff --git a/tests/requirements.txt b/tests/requirements.txt deleted file mode 100644 index df41f246..00000000 --- a/tests/requirements.txt +++ /dev/null @@ -1,8 +0,0 @@ -black==21.12b0 -click==8.0.4 -codecov -flake8==3.8.3 -mypy -pylint -pytest -pytest-cov