Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cov test 2 #23

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,33 @@ jobs:
with:
python-version: 3.12
cache: pip
- name: Install Nox and group dependencies
- name: Install dev group dependencies
run: pip install '.[dev]'
- name: Test with Nox
run: nox -s mypy-3.12
coverage:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: pip
- name: Install dev group dependencies
run: pip install '.[dev]'
- name: Install package in place
run: pip install -e .
# We are not testing with Nox because Nox / Pytest / Coverage and CodeCov
# have a weird cross interaction. It doesn't matter for us anyway because we use only
- name: Test with py test
run: pytest -n auto --cov --junitxml=junit.xml
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ dev = [
"pytest==8.3.2",
"pytest-cov==5.0.0",
"pytest_sugar==1.0.0",
"pytest-xdist==3.6.1",
"xsdata[cli]==24.7",
"ruff==0.5.5"
]
Expand Down
4 changes: 4 additions & 0 deletions src/greenbutton_objects/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
from greenbutton_objects.feed.feed import ObjectFeed


def untested_function(filename: str) -> str:
return filename.capitalize()


def parse_feed(filename: str) -> ObjectFeed:
data = parse_xml(filename)

Expand Down