| name: Coverage Linux |
| |
| on: |
| pull_request: |
| types: [opened, synchronize, reopened] |
| paths-ignore: |
| - '**.md' |
| - benchmark/** |
| - doc/** |
| - tools/** |
| - unit-test/** |
| - .github/** |
| - '!.github/workflows/coverage-linux.yml' |
| push: |
| branches: |
| - main |
| paths-ignore: |
| - '**.md' |
| - benchmark/** |
| - doc/** |
| - tools/** |
| - unit-test/** |
| - .github/** |
| - '!.github/workflows/coverage-linux.yml' |
| |
| env: |
| PYTHON_VERSION: '3.11' |
| NODE_VERSION: '22.x' |
| |
| permissions: |
| contents: read |
| |
| jobs: |
| coverage-linux: |
| runs-on: ubuntu-latest |
| steps: |
| - name: Harden Runner |
| uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0 |
| with: |
| egress-policy: audit |
| |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| with: |
| persist-credentials: false |
| - name: Set up Python ${{ env.PYTHON_VERSION }} |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 |
| with: |
| python-version: ${{ env.PYTHON_VERSION }} |
| - name: Use Node.js ${{ env.NODE_VERSION }} |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 |
| with: |
| node-version: ${{ env.NODE_VERSION }} |
| - name: Environment Information |
| run: npx envinfo |
| - name: Install gcovr |
| run: pip install gcovr==6.0 |
| - name: Install dependencies |
| run: npm install |
| - name: Test with coverage |
| run: | |
| npm run create-coverage |
| - name: Generate coverage report (XML) |
| run: | |
| npm run report-coverage-xml |
| - name: Upload |
| uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3 |
| with: |
| directory: ./coverage-xml |