Add coverage CI job #7
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: coverage | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| scan: | |
| name: Coverage report | |
| runs-on: ubuntu-22.04 | |
| container: quay.io/fedora/fedora:latest | |
| steps: | |
| - name: Install Dependencies | |
| run: | | |
| dnf -y install git clang gcc meson which pkgconf-pkg-config \ | |
| openssl-devel openssl diffutils expect opensc python3-six \ | |
| nss-softokn nss-tools nss-softokn-devel nss-devel softhsm \ | |
| p11-kit-devel kryoptic gcovr lcov | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Setup | |
| run: | | |
| git config --global --add safe.directory \ | |
| /__w/pkcs11-provider/pkcs11-provider | |
| git submodule update --init | |
| meson setup builddir -Db_coverage=true | |
| - name: Build, test and generate coverage reports | |
| run: | | |
| meson compile -C builddir | |
| meson test -C builddir | |
| ninja -C builddir coverage | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: Test valgrind logs ${{ matrix.name }}, ${{ matrix.compiler }}, ${{ matrix.token }} - ${{ steps.setup.cpu }} | |
| path: | | |
| builddir/meson-logs/coveragereport/ |