diff --git a/.github/workflows/test_examples.yml b/.github/workflows/test_examples.yml index 571d85bc6..e56c80885 100644 --- a/.github/workflows/test_examples.yml +++ b/.github/workflows/test_examples.yml @@ -57,4 +57,10 @@ jobs: pip install .[test] pip install -U "mesa[network] @ git+https://github.com/mesa/mesa@main" - name: Test with pytest - run: pytest -rA -Werror -Wdefault::PendingDeprecationWarning test_examples.py + run: pytest -rA -Werror -Wdefault::PendingDeprecationWarning --cov=examples --cov-report=xml --cov-report=term test_examples.py + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + files: ./coverage.xml + fail_ci_if_error: false + diff --git a/pyproject.toml b/pyproject.toml index d1514f823..bbaa17f0c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ readme = "README.md" test = [ "pytest", "scipy", + "pytest-cov", ] test_gis = [ "pytest",