2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 02:49:00 +00:00

Support CodeCov

This commit is contained in:
Jay Berkenbilt 2024-02-17 18:34:30 -05:00
parent c1a48ec81d
commit 1ab7c43a22
4 changed files with 38 additions and 0 deletions

View File

@ -123,6 +123,17 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: 'Sanitizer Tests' - name: 'Sanitizer Tests'
run: build-scripts/test-sanitizers run: build-scripts/test-sanitizers
CodeCov:
runs-on: ubuntu-latest
needs: Prebuild
steps:
- uses: actions/checkout@v3
- name: 'Code Coverage'
run: build-scripts/test-coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
QuickJobs: QuickJobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: Prebuild needs: Prebuild

View File

@ -3,6 +3,7 @@
[![QPDF](logo/qpdf.svg)](https://qpdf.sourceforge.io) [![QPDF](logo/qpdf.svg)](https://qpdf.sourceforge.io)
[![QPDF Build](https://github.com/qpdf/qpdf/workflows/QPDF%20Build/badge.svg)](https://github.com/qpdf/qpdf/actions) [![QPDF Build](https://github.com/qpdf/qpdf/workflows/QPDF%20Build/badge.svg)](https://github.com/qpdf/qpdf/actions)
[![codecov](https://codecov.io/gh/qpdf/qpdf/graph/badge.svg?token=ODijhBtAoW)](https://codecov.io/gh/qpdf/qpdf)
[![Documentation Status](https://readthedocs.org/projects/qpdf/badge/?version=latest)](https://qpdf.readthedocs.io/en/latest/?badge=latest) [![Documentation Status](https://readthedocs.org/projects/qpdf/badge/?version=latest)](https://qpdf.readthedocs.io/en/latest/?badge=latest)
QPDF is a command-line tool and C++ library that performs content-preserving transformations on PDF files. It supports linearization, encryption, and numerous other features. It can also be used for splitting and merging files, creating PDF files (but you have to supply all the content yourself), and inspecting files for study or analysis. QPDF does not render PDFs or perform text extraction, and it does not contain higher-level interfaces for working with page contents. It is a low-level tool for working with the structure of PDF files and can be a valuable tool for anyone who wants to do programmatic or command-line-based manipulation of PDF files. QPDF is a command-line tool and C++ library that performs content-preserving transformations on PDF files. It supports linearization, encryption, and numerous other features. It can also be used for splitting and merging files, creating PDF files (but you have to supply all the content yourself), and inspecting files for study or analysis. QPDF does not render PDFs or perform text extraction, and it does not contain higher-level interfaces for working with page contents. It is a low-level tool for working with the structure of PDF files and can be a valuable tool for anyone who wants to do programmatic or command-line-based manipulation of PDF files.

15
build-scripts/test-coverage Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
set -e
sudo apt-get update
sudo apt-get -y install \
build-essential cmake lcov \
zlib1g-dev libjpeg-dev libgnutls28-dev libssl-dev
cmake -S . -B build \
-DCI_MODE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Debug \
-DREQUIRE_CRYPTO_OPENSSL=1 -DREQUIRE_CRYPTO_GNUTLS=1 \
-DENABLE_QTC=1 -DENABLE_COVERAGE=ON
cmake --build build --verbose -j$(nproc) -- -k
(cd build; ctest --verbose)
lcov --capture --directory . --output-file coverage.info
lcov --remove coverage.info '/usr/*' --output-file coverage.info
lcov --list coverage.info

11
codecov.yml Normal file
View File

@ -0,0 +1,11 @@
# When modifying this file, please validate using
# curl -X POST --data-binary @codecov.yml https://codecov.io/validate
coverage:
status:
project:
default:
informational: true
patch:
default:
informational: true