123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- name: "Coverage"
- on:
- push:
- branches: [ "github" ]
- jobs:
- analyze:
- name: Analyze
- runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
- timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
- permissions:
- security-events: write
- strategy:
- fail-fast: false
- matrix:
- language: [ 'c-cpp' ]
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- - name: Install dependencies
- run: |
- sudo apt-get update
- sudo add-apt-repository --yes ppa:mhier/libboost-latest
- sudo apt-get install --yes build-essential git meson ninja-build cmake libboost1.81-dev libboost-log1.81-dev libyaml-cpp-dev libpcap-dev libtins-dev googletest gcovr
- git clone https://github.com/LaKabane/libtuntap.git /tmp/libtuntap/
- cd /tmp/
- cmake -DCMAKE_BUILD_TYPE=Release -B build -S "libtuntap"
- cmake --build build
- sudo cmake --install build --prefix /usr
- - name: Configure
- run: meson setup -Db_coverage=true build
- - name: Build
- run: make
- - name: Run tests
- run: make test
- - name: Generate coverage reports
- run: ninja -C build coverage-xml
- - name: Upload coverage reports to Codecov
- uses: codecov/codecov-action@v4.0.1
- with:
- token: ${{ secrets.CODECOV_TOKEN }}
- slug: marek22k/crazytrace-mirror
- files: build/meson-logs/coverage.xml
- - name: Upload coverage reports to CodeScene
- run: |
- curl https://deepsource.io/cli | sh
- ./bin/deepsource report --analyzer test-coverage --key cxx --value-file build/meson-logs/coverage.xml
- env:
- DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }}
|