Skip to content

Commit

Permalink
Merge pull request #65 from nlrcomcast/master
Browse files Browse the repository at this point in the history
Enable code coverage in wdmp-c github workflow
  • Loading branch information
sadhyama committed Nov 30, 2023
2 parents f9f687b + 26769b6 commit cc82bcf
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 3 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/push.yml
@@ -0,0 +1,71 @@
# SPDX-FileCopyrightText: 2023 Comcast Cable Communications Management, LLC
# SPDX-License-Identifier: Apache-2.0

name: CI

on:
pull_request:
push:
paths-ignore:
- 'AUTHORS'
- 'LICENSE'
- 'NOTICE'
- '**.md'
- '.gitignore'
tags-ignore:
- 'v[0-9]+.[0-9]+.[0-9]+'
branches:
- master

jobs:
test:
name: Unit Tests
runs-on: [ ubuntu-latest ]
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
fetch-depth: 0

# Install the dependent packages
- name: Install packages
run: |
sudo apt update
sudo apt-get -y install valgrind libcunit1 libcunit1-doc libcunit1-dev gcovr libtool xsltproc docbook-xsl
pip install codecov
- name: Make Build Directory
run: mkdir build

- name: Get Sonarcloud Binaries
uses: xmidt-org/sonarcloud-installer-action@v1
with:
working-directory: build

- name: CMake
working-directory: build
run: |
cmake .. -DDISABLE_VALGRIND:BOOL=${DISABLE_VALGRIND}
- name: Unit tests run
working-directory: build
run: |
build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output make all test
- name: Merge GCOV Reports for Sonarcloud
working-directory: build
run: |
gcovr --sonarqube coverage.xml -r ..
- name: Upload Codecov.io
uses: codecov/codecov-action@v1
with:
directory: .
fail_ci_if_error: true

# - name: Upload SonarCloud
# run: |
# build/sonar-scanner/bin/sonar-scanner -Dsonar.host.url=https://sonarcloud.io -Dproject.settings=.sonar-project.properties -Dsonar.login=${{ secrets.SONAR_TOKEN }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -2,10 +2,10 @@

C implementation of the WebPA Data Model Parser

[![Build Status](https://travis-ci.org/Comcast/wdmp-c.svg?branch=master)](https://travis-ci.org/Comcast/wdmp-c)
[![codecov.io](http://codecov.io/github/Comcast/wdmp-c/coverage.svg?branch=master)](http://codecov.io/github/Comcast/wdmp-c?branch=master)
[![Build Status](https://github.com/xmidt-org/wdmp-c/workflows/CI/badge.svg)](https://github.com/xmidt-org/wdmp-c/actions)
[![codecov.io](http://codecov.io/github/xmidt-org/wdmp-c/coverage.svg?branch=master)](http://codecov.io/github/xmidt-org/wdmp-c?branch=master)
[![coverity](https://img.shields.io/coverity/scan/11200.svg)](https://scan.coverity.com/projects/wdmp-c)
[![Apache V2 License](http://img.shields.io/badge/license-Apache%20V2-blue.svg)](https://github.com/Comcast/wdmp-c/blob/master/LICENSE)
[![Apache V2 License](http://img.shields.io/badge/license-Apache%20V2-blue.svg)](https://github.com/xmidt-org/wdmp-c/blob/master/LICENSE)

# Building and Testing Instructions

Expand Down

0 comments on commit cc82bcf

Please sign in to comment.