Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Code-Coverage

on:
pull_request:
push:
branches: [ master, 'v*-branch' ]
merge_group:
workflow_dispatch:

concurrency:
group: ${{ github.ref }}-coverage-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true

permissions:
contents: read
pull-requests: write

jobs:
linux-coverage:
name: Coverage
if: github.actor != 'restyled-io[bot]'

env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CC_SLUG: SiliconLabsSoftware/matter_sdk

runs-on: ubuntu-latest

container:
image: ghcr.io/project-chip/chip-build:167
volumes:
- "/:/runner-root-volume"
- "/tmp/log_output:/tmp/test_logs"
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install dependencies
run: |
apt-get update
apt-get install -y jq lcov
apt-get install -y libglib2.0-dev libdbus-1-dev

- name: Checkout submodules & Bootstrap
uses: ./.github/actions/checkout-submodules-and-bootstrap
with:
platform: linux
bootstrap-log-name: bootstrap-logs-codecov-linux

- name: Run Build Coverage
run: ./scripts/build_coverage.sh --yaml --xml

- name: Install gpg
run: |
apt-get update
apt-get install -y --no-install-recommends gnupg

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: out/coverage/coverage/coverage.xml
fail_ci_if_error: false
verbose: true
Loading