diff --git a/.coveragerc b/.coveragerc index 5fbefdc..51018c5 100644 --- a/.coveragerc +++ b/.coveragerc @@ -3,9 +3,7 @@ branch = True source = src/ -omit = - archive/* - */.local/* +# Do not omit tests folder as the tests coverage could not be 100% [report] # Regexes for lines to exclude from consideration @@ -25,7 +23,8 @@ exclude_lines = if 0: if __name__ == .__main__.: -ignore_errors = True + # Don't complain about function overloading + @overload [html] directory = coverage_html_report diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ccf9559..386d98a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,18 +31,31 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - name: Set up Python + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - run: pip install .[full,tests,lint] + - name: Install tests and lint dependencies + run: pip install .[tests,lint] - - run: flake8 - - run: mypy + - name: Lint + run: flake8 + - name: Type check + run: mypy - - run: pytest -# codecov coverage -# - run: pip install codecov pytest-cov -# - run: pytest --cov --cov-report=xml -# - name: Upload coverage to Codecov -# uses: codecov/codecov-action@v1 + - name: Test stdlib + run: pytest --cov=src --cov-report=xml + + - name: Install NumPy + run: pip install numpy + - name: Test with NumPy + run: pytest --cov=src --cov-report=xml --cov-append + + - name: Install full dependencies + run: pip install .[full] + - name: Test with full dependencies + run: pytest --cov=src --cov-report=xml --cov-append + + - name: Upload coverage + uses: codecov/codecov-action@v3 diff --git a/setup.cfg b/setup.cfg index 351b412..930dc22 100644 --- a/setup.cfg +++ b/setup.cfg @@ -39,6 +39,7 @@ pymap3d = py.typed [options.extras_require] tests = pytest + pytest-cov lint = flake8 flake8-bugbear @@ -55,5 +56,6 @@ full = numpy >= 1.10.0 astropy xarray + pandas testproj = pyproj