From 49dcfebfb33788ad1be309d77a6598e38276a788 Mon Sep 17 00:00:00 2001 From: l5y <220195275+l5yth@users.noreply.github.com> Date: Tue, 16 Sep 2025 12:04:46 +0200 Subject: [PATCH] Add Codecov coverage and test analytics for Python CI (#91) --- .github/workflows/python.yml | 20 +++++++++++++++++--- .gitignore | 4 ++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 6697a0b..acbdda5 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -24,10 +24,24 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install black pytest meshtastic + pip install black pytest pytest-cov meshtastic - name: Lint with black run: | black --check ./ - - name: Test with pytest + - name: Test with pytest and coverage run: | - pytest + mkdir -p reports + pytest --cov=data --cov-report=term --cov-report=xml:reports/python-coverage.xml --junitxml=reports/python-junit.xml + - name: Upload coverage to Codecov + if: always() + uses: codecov/codecov-action@v5 + with: + files: reports/python-coverage.xml + flags: python-ingestor + name: python-ingestor + - name: Upload test results to Codecov + if: always() + uses: codecov/test-results-action@v1 + with: + files: reports/python-junit.xml + flags: python-ingestor diff --git a/.gitignore b/.gitignore index b48987f..84ce222 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,7 @@ Gemfile.lock # Python cache directories __pycache__/ +.coverage +coverage.xml +htmlcov/ +reports/