Coverage #2226
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Coverage | |
| permissions: | |
| pull-requests: write | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| release: | |
| types: | |
| - published | |
| schedule: | |
| # At 12:00 on every day-of-month | |
| - cron: "0 12 */1 * *" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| coverage: | |
| runs-on: ubuntu-24.04 | |
| env: | |
| PYTHON: python3.13 | |
| MEMRAY_MINIMIZE_INLINING: 1 | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up dependencies | |
| run: | | |
| sudo add-apt-repository ppa:deadsnakes/ppa | |
| sudo apt-get update | |
| sudo apt-get install -qy \ | |
| pkg-config \ | |
| libdebuginfod-dev \ | |
| libunwind-dev \ | |
| liblz4-dev \ | |
| gdb \ | |
| lcov \ | |
| libdw-dev \ | |
| libelf-dev \ | |
| ${PYTHON}-dev \ | |
| ${PYTHON}-dbg \ | |
| ${PYTHON}-venv | |
| - name: Create a virtualenv | |
| run: | | |
| ${PYTHON} -m venv /tmp/coverage-venv | |
| - name: Set up PATH | |
| run: | | |
| echo /tmp/coverage-venv/bin >>"$GITHUB_PATH" | |
| echo /home/runner/node_modules/.bin >>"$GITHUB_PATH" | |
| - name: Install Python dependencies | |
| run: | | |
| ${PYTHON} -m pip install --upgrade pip cython pkgconfig | |
| make test-install | |
| - name: Disable ptrace security restrictions | |
| run: | | |
| echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope | |
| - name: Compute C++ coverage | |
| run: | | |
| make ccoverage | |
| - name: Compute Python + Cython coverage | |
| run: | | |
| make pycoverage | |
| - name: Upload C++ report to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: cppcoverage.lcov | |
| flags: cpp | |
| - name: Upload {P,C}ython report to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: pycoverage.lcov | |
| flags: python_and_cython |