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/