From e2dd89b297d8b1459ed83948be514fdef3b4c491 Mon Sep 17 00:00:00 2001 From: Gustavo Ye Date: Thu, 5 Sep 2024 16:16:52 +0800 Subject: [PATCH] ci: add code coverage report (#26) --- .github/workflows/test.yml | 22 +++++++++++----------- readme.md | 4 ++++ requirements-dev.txt | 3 ++- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 458c6d0..e893b30 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,14 +43,14 @@ jobs: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - name: Build and Test run: | - python -m pytest -o log_cli=true -o log_cli_level="INFO" -v ./ - # - name: Check codecov file - # id: check_files - # uses: andstor/file-existence-action@v1 - # with: - # files: './coverage.xml' - # - name: Upload coverage from test to Codecov - # uses: codecov/codecov-action@v2 - # with: - # file: ./coverage.xml - # token: ${{ secrets.CODECOV_TOKEN }} + python -m pytest -o log_cli=true -o log_cli_level="INFO" --cov=nano_graphrag --cov-report=xml -v ./ + - name: Check codecov file + id: check_files + uses: andstor/file-existence-action@v1 + with: + files: './coverage.xml' + - name: Upload coverage from test to Codecov + uses: codecov/codecov-action@v2 + with: + file: ./coverage.xml + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/readme.md b/readme.md index cdc38a6..570b7ce 100644 --- a/readme.md +++ b/readme.md @@ -11,6 +11,9 @@ + + + @@ -23,6 +26,7 @@ + 😭 [GraphRAG](https://arxiv.org/pdf/2404.16130) is good and powerful, but the official [implementation](https://github.com/microsoft/graphrag/tree/main) is difficult/painful to **read or hack**. 😊 This project provides a **smaller, faster, cleaner GraphRAG**, while remaining the core functionality(see [benchmark](#benchmark) and [issues](#Issues) ). diff --git a/requirements-dev.txt b/requirements-dev.txt index 9b4930f..5806a58 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,5 @@ flake8 pytest future -pytest-asyncio \ No newline at end of file +pytest-asyncio +pytest-cov \ No newline at end of file