diff --git a/.coveragerc b/.coveragerc index ddf915a5d..1a97df38e 100644 --- a/.coveragerc +++ b/.coveragerc @@ -9,4 +9,4 @@ omit = exclude_lines = pragma: no cover - raise NotImplementedError + raise NotImplementedError \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77e81bac5..a20807f36 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -200,3 +200,64 @@ jobs: - name: Build Documentation run: | sphinx-build -b html docs/source/ docs/build/html + +test-python-c++-unified-report: + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + # Step 1: Checkout Repository + - name: Checkout Repository + uses: actions/checkout@v4 + + # Step 2: Set up Python + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + # Step 3: Install Python Dependencies + - name: Install Python Dependencies + run: | + python -m pip install --upgrade pip + python -m pip install pytest pytest-cov cobertura-merge + + # Step 4: Run Python Tests and Generate Coverage + - name: Run Python Tests + run: | + pytest tests/ --cov=src --cov-report xml:coverage-python.xml --cov-report html:coverage-html + + # Step 5: Install C++ Dependencies + - name: Install C++ Dependencies + run: | + sudo apt-get update + sudo apt-get install -y g++ gcov lcov + + # Step 6: Compile and Run C++ Tests + - name: Compile and Run C++ Tests + run: | + g++ -o tests/test_cpp tests/test.cpp + ./tests/test_cpp + lcov --capture --directory . --output-file coverage-cpp.info + + # Step 7: Convert C++ Coverage to XML (Using `gcovr`) + - name: Convert C++ Coverage to XML + run: | + python -m pip install gcovr + gcovr -r . --xml-pretty --output coverage-cpp.xml + + # Step 8: Combine Coverage Reports + - name: Combine Coverage Reports + run: | + python -m cobertura_merge coverage-python.xml coverage-cpp.xml -o unified-reports/combined-coverage.xml + + # Step 9: Generate HTML Report from Combined Coverage + - name: Generate HTML Report + run: | + python -m pip install coverage html-report + coverage html -i --data unified-reports/combined-coverage.xml --directory unified-reports/html + + # Step 10: Upload Combined Coverage to Codecov + - name: Upload Combined Coverage to Codecov + run: bash <(curl -s https://codecov.io/bash) -f unified-reports/combined-coverage.xml + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/condaenv.6s9mei4e.requirements.txt b/condaenv.6s9mei4e.requirements.txt new file mode 100644 index 000000000..1be5760d1 --- /dev/null +++ b/condaenv.6s9mei4e.requirements.txt @@ -0,0 +1,5 @@ +codecov +pytest-cov +sphinx==5.0 +sphinx-readable-theme==1.3.0 +myst_nb==0.17.2 \ No newline at end of file diff --git a/pydatastructs/linear_data_structures/_backend/cpp/_algorithms.cp312-win_amd64.pyd b/pydatastructs/linear_data_structures/_backend/cpp/_algorithms.cp312-win_amd64.pyd new file mode 100644 index 000000000..7e49bcb40 Binary files /dev/null and b/pydatastructs/linear_data_structures/_backend/cpp/_algorithms.cp312-win_amd64.pyd differ diff --git a/pydatastructs/linear_data_structures/_backend/cpp/_arrays.cp312-win_amd64.pyd b/pydatastructs/linear_data_structures/_backend/cpp/_arrays.cp312-win_amd64.pyd new file mode 100644 index 000000000..aee3d6d31 Binary files /dev/null and b/pydatastructs/linear_data_structures/_backend/cpp/_arrays.cp312-win_amd64.pyd differ diff --git a/pydatastructs/miscellaneous_data_structures/_backend/cpp/_stack.cp312-win_amd64.pyd b/pydatastructs/miscellaneous_data_structures/_backend/cpp/_stack.cp312-win_amd64.pyd new file mode 100644 index 000000000..fd4437e57 Binary files /dev/null and b/pydatastructs/miscellaneous_data_structures/_backend/cpp/_stack.cp312-win_amd64.pyd differ diff --git a/pydatastructs/trees/_backend/cpp/_trees.cp312-win_amd64.pyd b/pydatastructs/trees/_backend/cpp/_trees.cp312-win_amd64.pyd new file mode 100644 index 000000000..49adcfdd3 Binary files /dev/null and b/pydatastructs/trees/_backend/cpp/_trees.cp312-win_amd64.pyd differ diff --git a/pydatastructs/utils/_backend/cpp/_nodes.cp312-win_amd64.pyd b/pydatastructs/utils/_backend/cpp/_nodes.cp312-win_amd64.pyd new file mode 100644 index 000000000..eb01c420a Binary files /dev/null and b/pydatastructs/utils/_backend/cpp/_nodes.cp312-win_amd64.pyd differ