diff --git a/.github/workflows/scan_coverage.yml b/.github/workflows/scan_coverage.yml new file mode 100644 index 00000000000..231eafa62f4 --- /dev/null +++ b/.github/workflows/scan_coverage.yml @@ -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 diff --git a/.github/workflows/scans.yml b/.github/workflows/scans.yml index 6f19a4f66a6..fe8174e6152 100644 --- a/.github/workflows/scans.yml +++ b/.github/workflows/scans.yml @@ -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