diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 281d85f..8b5fed4 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -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 }} diff --git a/pyproject.toml b/pyproject.toml index 020e7d2..eb94673 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" ] diff --git a/src/greenbutton_objects/parse.py b/src/greenbutton_objects/parse.py index 6cac61d..351c9d7 100755 --- a/src/greenbutton_objects/parse.py +++ b/src/greenbutton_objects/parse.py @@ -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)