Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common: add coverage scan #5806

Merged
merged 1 commit into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
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
37 changes: 37 additions & 0 deletions .github/workflows/scan_coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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++
MAKE_PKG: 0
SRC_CHECKERS: 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
2 changes: 2 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
fail-fast: false
matrix:
include:
# Note: All coverage scans should be run in the same environment.
# Please see the coverage scan workflow for the reference environment.
- {TEST_BUILD: debug, COVERAGE: 1}
- {TEST_BUILD: nondebug, COVERAGE: 0}
steps:
Expand Down
Loading