Skip to content

Commit

Permalink
common: add coverage scan
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Michalski <jan.michalski@intel.com>
  • Loading branch information
janekmi committed Jul 20, 2023
1 parent 26e41f8 commit 9fd3750
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/scan_coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Measure code coverage and report it to codecov.io
name: Coverage

on:
workflow_dispatch:
workflow_call:

env:
# Note: All coverage scans, e.g. on pull requests, should be run in the same
# environment.
GITHUB_REPO: pmem/pmdk
DOCKER_REPO: ghcr.io/pmem/pmdk
HOST_WORKDIR: /home/runner/work/pmdk/pmdk
WORKDIR: utils/docker
PMDK_CC: gcc
PMDK_CXX: g++
VALGRIND: 0
OS: ubuntu
OS_VER: 22.04
COVERAGE: 1
TEST_BUILD: debug
FAULT_INJECTION: 1

jobs:
linux:
name: Linux
runs-on: ubuntu-latest
steps:
- name: Clone the git repo
uses: actions/checkout@v3

- name: Pull the image
run: cd $WORKDIR && ./pull-or-rebuild-image.sh

- name: Measure and upload code coverage
run: cd $WORKDIR && ./build-CI.sh
3 changes: 3 additions & 0 deletions .github/workflows/scans.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
COVERITY_SCAN_NOTIFICATION_EMAIL: ${{ secrets.COVERITY_SCAN_NOTIFICATION_EMAIL }}
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
name: Coverity
call-coverage:
uses: ./.github/workflows/scan_coverage.yml
name: Coverage
call-documentation:
uses: ./.github/workflows/scan_documentation.yml
name: Documentation

0 comments on commit 9fd3750

Please sign in to comment.