From db32a5bf4757d671a12e37e511655f1784e94a80 Mon Sep 17 00:00:00 2001 From: Roland Guichard Date: Thu, 16 Jan 2025 14:39:38 +0000 Subject: [PATCH] Enable coverage badge. --- .github/workflows/test.yml | 14 ++++++-------- README.md | 2 ++ pyproject.toml | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a6ca30e..3e8c155 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,13 +18,13 @@ concurrency: jobs: test_qadence_ubuntu: - name: Qadence (ubuntu) + name: Qadence2-IR (ubuntu) runs-on: ubuntu-latest strategy: matrix: python-version: ["3.10", "3.11", "3.12", "3.13"] steps: - - name: Checkout Qadence + - name: Checkout Qadence2-IR uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 @@ -36,13 +36,11 @@ jobs: - name: Run tests run: | hatch -v run test - - name: Upload coverage data - uses: actions/upload-artifact@v4 + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v5 with: - name: "coverage-data-${{ matrix.python-version }}" - path: .coverage - include-hidden-files: true - if-no-files-found: ignore + token: ${{ secrets.CODECOV_TOKEN }} + slug: pasqal-io/qadence2-ir publish: name: Publish to PyPI diff --git a/README.md b/README.md index bf91bb5..2b1fca3 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ Qadence 2 IR specifies an intermediate representation for Qadence 2. Front-ends, like [Qadence 2 Expressions](https://github.com/pasqal-io/qadence2-expressions), can compile to the IR and backends, like [Pulser](http://github.com/pasqal-io/pulser) or [PyQTorch](https://github.com/pasqal-io/pyqtorch) can be targeted from the IR using [Qadence 2 Platforms](https://github.com/pasqal-io/qadence-platforms). +![Coverage](https://img.shields.io/codecov/c/github/pasqal-io/qadence2-ir?style=flat-square) + ## Installation !!! note diff --git a/pyproject.toml b/pyproject.toml index 9d30a90..5ebf321 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,11 +60,11 @@ dependencies = [ ] [tool.hatch.envs.default.scripts] -test = "pytest -n auto --cov-config=pyproject.toml --cov=qadence2_ir {args}" +test = "pytest -n auto --cov-report=xml --cov-config=pyproject.toml --cov=qadence2_ir --cov=tests {args}" [tool.pytest.ini_options] testpaths = ["tests"] -addopts = """-vvv --cov-config=pyproject.toml --cov=qadence2_ir""" +addopts = """-vvv""" xfail_strict = true filterwarnings = [ "ignore:Call to deprecated create function FieldDescriptor",