From 37cf6b31ed2c6335b326514803acd64f88dc9796 Mon Sep 17 00:00:00 2001 From: ayush-eb Date: Tue, 17 Feb 2026 12:05:39 +0530 Subject: [PATCH] Update README with new badge links and add Qlty CI workflow for testing and coverage --- .github/workflows/qlty.yml | 43 ++++++++++++++++++++++++++++++++++++++ README.rst | 7 +++++-- 2 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/qlty.yml diff --git a/.github/workflows/qlty.yml b/.github/workflows/qlty.yml new file mode 100644 index 0000000..a3a026a --- /dev/null +++ b/.github/workflows/qlty.yml @@ -0,0 +1,43 @@ +name: Qlty + +on: + push: + branches: [master] + pull_request: + branches: [master] + +permissions: + contents: read + id-token: write + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10"] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools + pip install .[testing] + + - name: Run tests with coverage + run: pytest --cov-report term-missing --cov-report xml + + - name: Upload coverage to Qlty + if: always() && hashFiles('coverage.xml') != '' + uses: qltysh/qlty-action/coverage@v2 + with: + oidc: true + files: coverage.xml + add-prefix: pymetrics/ diff --git a/README.rst b/README.rst index b748ec1..5059724 100644 --- a/README.rst +++ b/README.rst @@ -10,8 +10,11 @@ PyMetrics - Versatile Metrics Collection for Python .. image:: https://img.shields.io/pypi/l/pymetrics.svg :target: https://pypi.python.org/pypi/pymetrics -.. image:: https://api.travis-ci.org/eventbrite/pymetrics.svg - :target: https://travis-ci.org/eventbrite/pymetrics +.. image:: https://qlty.sh/gh/eventbrite/projects/pymetrics/maintainability.svg + :target: https://qlty.sh/gh/eventbrite/projects/pymetrics + +.. image:: https://qlty.sh/gh/eventbrite/projects/pymetrics/coverage.svg + :target: https://qlty.sh/gh/eventbrite/projects/pymetrics .. image:: https://img.shields.io/pypi/v/pymetrics.svg :target: https://pypi.python.org/pypi/pymetrics