From 1401f1863352621ca20d30ea00c446fb927fe3b5 Mon Sep 17 00:00:00 2001 From: Elias Bermudez Date: Tue, 16 Sep 2025 17:52:02 -0700 Subject: [PATCH 01/22] Add initial code coverage git workflow --- .github/workflows/code_coverage.yml | 44 +++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/code_coverage.yml diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml new file mode 100644 index 0000000000..41ddab846f --- /dev/null +++ b/.github/workflows/code_coverage.yml @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +name: Coverage Report + +on: + push: + branches: + - main + +jobs: + coverage: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install uv + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + + - name: Set up Python and dependencies with uv + run: | + uv venv --python 3.10 + source .venv/bin/activate + uv pip install -r requirements.txt + uv pip install pytest pytest-cov + + - name: Run tests and collect coverage + run: | + source .venv/bin/activate + pytest --cov=. --cov-report=html:coverage_html + + - name: Upload coverage report as artifact + uses: actions/upload-artifact@v4 + with: + name: coverage-html + path: coverage_html + + - name: Deploy coverage report to GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: coverage_html + publish_branch: gh-pages From e94f34dd0a840d45e86f78d6fc412ca696e6f7b2 Mon Sep 17 00:00:00 2001 From: Elias Bermudez Date: Wed, 17 Sep 2025 14:20:30 -0700 Subject: [PATCH 02/22] Remove branch filter for testing --- .github/workflows/code_coverage.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 41ddab846f..05870c6ff6 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -4,8 +4,6 @@ name: Coverage Report on: push: - branches: - - main jobs: coverage: From 9ff19883a5904e96e7afaac6b6b96dca2dbfe7aa Mon Sep 17 00:00:00 2001 From: Elias Bermudez Date: Wed, 17 Sep 2025 14:22:10 -0700 Subject: [PATCH 03/22] Change coverage folder --- .github/workflows/code_coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 05870c6ff6..36b62ff6ff 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -26,7 +26,7 @@ jobs: - name: Run tests and collect coverage run: | source .venv/bin/activate - pytest --cov=. --cov-report=html:coverage_html + pytest --cov=aiperf --cov-report=html:coverage_html - name: Upload coverage report as artifact uses: actions/upload-artifact@v4 From 10c4032677b4e05d2056454b3f06d48fe5389053 Mon Sep 17 00:00:00 2001 From: Elias Bermudez Date: Wed, 17 Sep 2025 14:32:02 -0700 Subject: [PATCH 04/22] Update install portion --- .github/workflows/code_coverage.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 36b62ff6ff..aeea6965cc 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -20,12 +20,10 @@ jobs: run: | uv venv --python 3.10 source .venv/bin/activate - uv pip install -r requirements.txt - uv pip install pytest pytest-cov + uv pip install -e ".[dev]" - name: Run tests and collect coverage run: | - source .venv/bin/activate pytest --cov=aiperf --cov-report=html:coverage_html - name: Upload coverage report as artifact From ff69fb2cc061f29e8cc096922f32913f3b36fa93 Mon Sep 17 00:00:00 2001 From: Elias Bermudez Date: Wed, 17 Sep 2025 14:38:13 -0700 Subject: [PATCH 05/22] Resource venv --- .github/workflows/code_coverage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index aeea6965cc..c30d4d6acc 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -24,6 +24,7 @@ jobs: - name: Run tests and collect coverage run: | + source .venv/bin/activate pytest --cov=aiperf --cov-report=html:coverage_html - name: Upload coverage report as artifact From 3d784c0baada728a6632dbb2aa78df93a075e7af Mon Sep 17 00:00:00 2001 From: Elias Bermudez Date: Wed, 17 Sep 2025 15:05:01 -0700 Subject: [PATCH 06/22] Update directory name for publishing --- .github/workflows/code_coverage.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index c30d4d6acc..67a837e15f 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -25,17 +25,17 @@ jobs: - name: Run tests and collect coverage run: | source .venv/bin/activate - pytest --cov=aiperf --cov-report=html:coverage_html + pytest --cov=aiperf --cov-report=html:htmlcov - name: Upload coverage report as artifact uses: actions/upload-artifact@v4 with: - name: coverage-html - path: coverage_html + name: htmlcov + path: htmlcov - name: Deploy coverage report to GitHub Pages uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: coverage_html + publish_dir: htmlcov publish_branch: gh-pages From ac22a720bf22cabbce299f621f36fc427afb6db3 Mon Sep 17 00:00:00 2001 From: Elias Bermudez Date: Wed, 17 Sep 2025 15:16:44 -0700 Subject: [PATCH 07/22] Remove documentation script --- tools/generate_api_md.py | 45 ---------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 tools/generate_api_md.py diff --git a/tools/generate_api_md.py b/tools/generate_api_md.py deleted file mode 100644 index 5196fd8317..0000000000 --- a/tools/generate_api_md.py +++ /dev/null @@ -1,45 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 -import os -from pathlib import Path - -PROJECT_ROOT = Path(__file__).parent.parent -SRC_ROOT = PROJECT_ROOT / "aiperf" -API_MD_PATH = PROJECT_ROOT / "docs" / "api.md" - -MODULES = [] - - -def module_path_from_file(py_path: Path) -> str: - rel_path = py_path.relative_to(SRC_ROOT.parent) - parts = rel_path.with_suffix("").parts - return ".".join(parts) - - -def find_all_python_modules(): - for dirpath, _, filenames in os.walk(SRC_ROOT): - for filename in filenames: - if filename.endswith(".py") and filename != "__init__.py": - py_path = Path(dirpath) / filename - mod_path = module_path_from_file(py_path) - MODULES.append(mod_path) - - -def write_api_md(): - with open(API_MD_PATH, "w", encoding="utf-8") as f: - f.write("# API Reference\n\n") - f.write( - "This page contains the API documentation for all Python modules in the codebase (excluding __init__.py files).\n\n" - ) - for mod in sorted(MODULES): - f.write(f"## {mod}\n\n::: {mod}\n\n") - - -def main(): - find_all_python_modules() - write_api_md() - print(f"Generated {API_MD_PATH} with {len(MODULES)} modules.") - - -if __name__ == "__main__": - main() From cc53586ed75ecae8e034a498f7df168d5d0b511c Mon Sep 17 00:00:00 2001 From: Elias Bermudez Date: Wed, 17 Sep 2025 15:32:52 -0700 Subject: [PATCH 08/22] Adjust path for html artifacts --- .github/workflows/code_coverage.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 67a837e15f..4f86c8d4e7 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -31,11 +31,11 @@ jobs: uses: actions/upload-artifact@v4 with: name: htmlcov - path: htmlcov + path: ./htmlcov - name: Deploy coverage report to GitHub Pages uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: htmlcov + publish_dir: ./htmlcov publish_branch: gh-pages From 2aad8a1b01afebbdd0ee56ec4257b96b8ee0d599 Mon Sep 17 00:00:00 2001 From: Elias Bermudez Date: Wed, 17 Sep 2025 16:13:27 -0700 Subject: [PATCH 09/22] Change on settings --- .github/workflows/code_coverage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 4f86c8d4e7..89b1bfbdbb 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -4,6 +4,7 @@ name: Coverage Report on: push: + pull_request: jobs: coverage: From a066eff3edda0f2eff9b273ca7c5ca99aad4f3a3 Mon Sep 17 00:00:00 2001 From: Elias Bermudez Date: Wed, 17 Sep 2025 16:16:20 -0700 Subject: [PATCH 10/22] Change publish dir --- .github/workflows/code_coverage.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 89b1bfbdbb..67a837e15f 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -4,7 +4,6 @@ name: Coverage Report on: push: - pull_request: jobs: coverage: @@ -32,11 +31,11 @@ jobs: uses: actions/upload-artifact@v4 with: name: htmlcov - path: ./htmlcov + path: htmlcov - name: Deploy coverage report to GitHub Pages uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./htmlcov + publish_dir: htmlcov publish_branch: gh-pages From e8402a28494c24f25f211374574d9cb26d8d9e8a Mon Sep 17 00:00:00 2001 From: Elias Bermudez Date: Wed, 17 Sep 2025 16:23:46 -0700 Subject: [PATCH 11/22] Add ls command to see inside htmlcov --- .github/workflows/code_coverage.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 67a837e15f..a1612d17ce 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -33,6 +33,9 @@ jobs: name: htmlcov path: htmlcov + - name: List files in htmlcov + run: ls -R htmlcov + - name: Deploy coverage report to GitHub Pages uses: peaceiris/actions-gh-pages@v4 with: From ee480b6576630ed952bad343782820287281c9db Mon Sep 17 00:00:00 2001 From: Elias Bermudez Date: Wed, 17 Sep 2025 16:35:57 -0700 Subject: [PATCH 12/22] Update publish dir --- .github/workflows/code_coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index a1612d17ce..5ca0ddcc0d 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -40,5 +40,5 @@ jobs: uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: htmlcov + publish_dir: ./htmlcov publish_branch: gh-pages From 32c673929d0ed88e41f9cda183a55ff52af04ab8 Mon Sep 17 00:00:00 2001 From: Elias Bermudez Date: Wed, 17 Sep 2025 17:03:22 -0700 Subject: [PATCH 13/22] debug deploy --- .github/workflows/generate_documentation.yaml | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/generate_documentation.yaml diff --git a/.github/workflows/generate_documentation.yaml b/.github/workflows/generate_documentation.yaml new file mode 100644 index 0000000000..4dbbf2de10 --- /dev/null +++ b/.github/workflows/generate_documentation.yaml @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +name: Generate and Deploy Documentation + +on: + pull_request: + types: [closed] + branches: + - main + workflow_dispatch: + +jobs: + build-deploy-docs: + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install mkdocs mkdocs-material mkdocstrings[python] + + - name: Generate API Reference Markdown + run: | + python tools/generate_api_md.py + + - name: Build documentation + run: | + mkdocs build + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + run: | + pwd && ls -la . + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./site From 4616d26a864746c87ff32366f4acad26996889c3 Mon Sep 17 00:00:00 2001 From: Elias Bermudez Date: Wed, 17 Sep 2025 17:05:32 -0700 Subject: [PATCH 14/22] Remove documentation file --- .github/workflows/code_coverage.yml | 2 + .github/workflows/generate_documentation.yaml | 44 ------------------- 2 files changed, 2 insertions(+), 44 deletions(-) delete mode 100644 .github/workflows/generate_documentation.yaml diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 5ca0ddcc0d..f85e34b66d 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -37,6 +37,8 @@ jobs: run: ls -R htmlcov - name: Deploy coverage report to GitHub Pages + run: | + pwd && ls -la . uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/generate_documentation.yaml b/.github/workflows/generate_documentation.yaml deleted file mode 100644 index 4dbbf2de10..0000000000 --- a/.github/workflows/generate_documentation.yaml +++ /dev/null @@ -1,44 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 -name: Generate and Deploy Documentation - -on: - pull_request: - types: [closed] - branches: - - main - workflow_dispatch: - -jobs: - build-deploy-docs: - if: github.event.pull_request.merged == true - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install mkdocs mkdocs-material mkdocstrings[python] - - - name: Generate API Reference Markdown - run: | - python tools/generate_api_md.py - - - name: Build documentation - run: | - mkdocs build - - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v4 - run: | - pwd && ls -la . - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./site From 0022277586ce2ffbd3724e572f29f325ae4411e5 Mon Sep 17 00:00:00 2001 From: Elias Bermudez Date: Wed, 17 Sep 2025 17:15:21 -0700 Subject: [PATCH 15/22] fix run command --- .github/workflows/code_coverage.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index f85e34b66d..5ca0ddcc0d 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -37,8 +37,6 @@ jobs: run: ls -R htmlcov - name: Deploy coverage report to GitHub Pages - run: | - pwd && ls -la . uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} From 3d8f7f484597eae0a0b8dd0455bd952387e260a6 Mon Sep 17 00:00:00 2001 From: Elias Bermudez Date: Wed, 17 Sep 2025 17:17:35 -0700 Subject: [PATCH 16/22] Skip artifact upload --- .github/workflows/code_coverage.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 5ca0ddcc0d..374f88c12c 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -27,11 +27,11 @@ jobs: source .venv/bin/activate pytest --cov=aiperf --cov-report=html:htmlcov - - name: Upload coverage report as artifact - uses: actions/upload-artifact@v4 - with: - name: htmlcov - path: htmlcov + # - name: Upload coverage report as artifact + # uses: actions/upload-artifact@v4 + # with: + # name: htmlcov + # path: ./htmlcov - name: List files in htmlcov run: ls -R htmlcov From ba685949c61dcba621d10075ce15a009fd59aa32 Mon Sep 17 00:00:00 2001 From: Elias Bermudez Date: Wed, 17 Sep 2025 17:32:12 -0700 Subject: [PATCH 17/22] Update htmlcov path --- .github/workflows/code_coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 374f88c12c..91ecc312ae 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -40,5 +40,5 @@ jobs: uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./htmlcov + publish_dir: htmlcov publish_branch: gh-pages From 17ffbbd81f8cd975287ae93f0d5f5a3ef96d0896 Mon Sep 17 00:00:00 2001 From: Elias Bermudez Date: Thu, 18 Sep 2025 14:43:52 -0700 Subject: [PATCH 18/22] Switch to codecov for coverage reporting --- .github/workflows/code_coverage.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 91ecc312ae..bfb3ffdc6c 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -25,20 +25,10 @@ jobs: - name: Run tests and collect coverage run: | source .venv/bin/activate - pytest --cov=aiperf --cov-report=html:htmlcov + pytest --cov=aiperf --cov-branch --cov-report=xml - # - name: Upload coverage report as artifact - # uses: actions/upload-artifact@v4 - # with: - # name: htmlcov - # path: ./htmlcov - - - name: List files in htmlcov - run: ls -R htmlcov - - - name: Deploy coverage report to GitHub Pages - uses: peaceiris/actions-gh-pages@v4 + - name: Upload results to Codecov + uses: codecov/codecov-action@v5 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: htmlcov - publish_branch: gh-pages + token: ${{ secrets.CODECOV_TOKEN }} + slug: ai-dynamo/aiperf From f4bcc388320ce0c4dfeb00e0f6031bcc7daf213b Mon Sep 17 00:00:00 2001 From: Elias Bermudez Date: Thu, 18 Sep 2025 14:55:40 -0700 Subject: [PATCH 19/22] fix indentation --- .github/workflows/code_coverage.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index bfb3ffdc6c..22132133cf 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -25,9 +25,9 @@ jobs: - name: Run tests and collect coverage run: | source .venv/bin/activate - pytest --cov=aiperf --cov-branch --cov-report=xml + pytest --cov=aiperf --cov-branch --cov-report=xml - - name: Upload results to Codecov + - name: Upload results to Codecov uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} From ee6bda1a7968ec40cdc37c2b3900ee04bd53f85d Mon Sep 17 00:00:00 2001 From: Elias Bermudez Date: Fri, 19 Sep 2025 15:58:31 -0700 Subject: [PATCH 20/22] Update unit tests to run coverage --- .github/workflows/run-unit-tests.yml | 10 ++++++++-- Makefile | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-unit-tests.yml b/.github/workflows/run-unit-tests.yml index 93cd21aa38..3047045055 100644 --- a/.github/workflows/run-unit-tests.yml +++ b/.github/workflows/run-unit-tests.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-22.04"] + os: ["ubuntu-latest"] python-version: ["3.10"] steps: @@ -25,4 +25,10 @@ jobs: make first-time-setup - name: Run unit tests run: | - make test + make coverage + + - name: Upload results to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: ai-dynamo/aiperf diff --git a/Makefile b/Makefile index 023cd6c439..404521e239 100644 --- a/Makefile +++ b/Makefile @@ -112,7 +112,7 @@ test-verbose: #? run the tests using pytest-xdist with DEBUG logging. $(activate_venv) && pytest -n auto -v -s --log-cli-level DEBUG coverage: #? run the tests and generate an html coverage report. - $(activate_venv) && pytest -n auto --cov=aiperf --cov-report=html $(args) + $(activate_venv) && pytest -n auto --cov=aiperf --cov-report=html --cov-report=xml $(args) install: #? install the project in editable mode. $(activate_venv) && uv pip install -e ".[dev]" $(args) From 6a64f787a6c5622e12819c5dcb35b48853c4620f Mon Sep 17 00:00:00 2001 From: Elias Bermudez Date: Fri, 19 Sep 2025 15:59:10 -0700 Subject: [PATCH 21/22] Remove coverage file now that the unit tests handle this --- .github/workflows/code_coverage.yml | 34 ----------------------------- 1 file changed, 34 deletions(-) delete mode 100644 .github/workflows/code_coverage.yml diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml deleted file mode 100644 index 22132133cf..0000000000 --- a/.github/workflows/code_coverage.yml +++ /dev/null @@ -1,34 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 -name: Coverage Report - -on: - push: - -jobs: - coverage: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install uv - run: | - curl -LsSf https://astral.sh/uv/install.sh | sh - - - name: Set up Python and dependencies with uv - run: | - uv venv --python 3.10 - source .venv/bin/activate - uv pip install -e ".[dev]" - - - name: Run tests and collect coverage - run: | - source .venv/bin/activate - pytest --cov=aiperf --cov-branch --cov-report=xml - - - name: Upload results to Codecov - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - slug: ai-dynamo/aiperf From 05a296cc6d8321c7cfabdde30ddaf5e65d0b0da9 Mon Sep 17 00:00:00 2001 From: Elias Bermudez Date: Fri, 19 Sep 2025 16:06:30 -0700 Subject: [PATCH 22/22] Add branch coverage to make coverage --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 404521e239..e43a5aff4a 100644 --- a/Makefile +++ b/Makefile @@ -112,7 +112,7 @@ test-verbose: #? run the tests using pytest-xdist with DEBUG logging. $(activate_venv) && pytest -n auto -v -s --log-cli-level DEBUG coverage: #? run the tests and generate an html coverage report. - $(activate_venv) && pytest -n auto --cov=aiperf --cov-report=html --cov-report=xml $(args) + $(activate_venv) && pytest -n auto --cov=aiperf --cov-branch --cov-report=html --cov-report=xml $(args) install: #? install the project in editable mode. $(activate_venv) && uv pip install -e ".[dev]" $(args)