From 4aef5df37483fabc9d191ae030271495cb3ed6f2 Mon Sep 17 00:00:00 2001 From: Ricky Schools Date: Sat, 27 Apr 2024 19:55:36 -0400 Subject: [PATCH] Use CodeCov for Coverage Reports and Badges Use CodeCov for Coverage Reports and Badges --- .github/workflows/tests.yaml | 20 +++----------------- README.md | 2 +- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index f230c6a..1b0fad7 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -43,24 +43,10 @@ jobs: - name: Run Unit Tests run: tox -p -e $(tox -l | grep $(echo ${{ matrix.python-version }} | sed 's/\.//g') | paste -sd "," -) -vv - - name: "Combine Coverage Summary" - run: | - export TOTAL=$(python -c "import json;print(json.load(open('coverage.json'))['totals']['percent_covered_display'])") - echo "total=$TOTAL" >> $GITHUB_ENV - echo "### Total coverage: ${TOTAL}%" >> $GITHUB_STEP_SUMMARY - - - name: Install coverage badge requirements - run: | - npm i coverage-badges-cli - - - name: Create Coverage Badges - uses: jaywcjlove/coverage-badges-cli@main + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 with: - style: flat - source: ./coverage.json - output: coverage/badges.svg - jsonPath: totals.percent_covered - + token: ${{ secrets.CODECOV_TOKEN }} docs: runs-on: ubuntu-latest diff --git a/README.md b/README.md index fc27066..bb1acf5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # `dltflow` -![Coverage](./coverage/badges.svg) ![Static Badge](https://img.shields.io/badge/python-3.9%2C_3.10%2C_3.11%2C-blue) ![Static Badge](https://img.shields.io/badge/pyspark-3.4%2C_3.5-blue) +![Static Badge](https://img.shields.io/badge/python-3.9%2C_3.10%2C_3.11%2C-blue) ![Static Badge](https://img.shields.io/badge/pyspark-3.4%2C_3.5-blue) [![codecov](https://codecov.io/gh/rickyschools/dltflow/graph/badge.svg?token=OSHZBF2639)](https://codecov.io/gh/rickyschools/dltflow) `dltflow` is a Python package that provides authoring utilities and CD patterns for Databricks' DLT product. It intends make writing and deploying DLT code and pipelines to Databricks as easy as possible.